# Income tax on salary

> Income tax on salary from the salaried rate table of the Income Tax Ordinance 2001, tax years 2020 to 2027, exact to the paisa.

Source: https://pakdatakit.dev/docs/incometax/

`import { calculateSalaryTax, calculateMonthlySalaryTax, getTaxYear } from 'pakdatakit/incometax'`

The salaried rate table is in the First Schedule, Part I, Division I, clause (2) of the Income Tax Ordinance 2001. It applies when salary is more than 75% of taxable income. Tax year 2027 runs from 1 July 2026 to 30 June 2027 and uses the table substituted by the Finance Act 2026.

## Examples

**TypeScript**

```ts
import { calculateSalaryTax, calculateMonthlySalaryTax, getTaxYear } from 'pakdatakit';

calculateSalaryTax(5000000, { taxYear: 2027 });
// → {
//     "tax": 802000,
//     "monthly": 66833.33,
//     "effectiveRate": 16.04,
//     "slab": {
//       "over": 4100000,
//       "upTo": 5600000,
//       "fixed": 541000,
//       "rate": 29
//     },
//     "taxYear": 2027
//   }

calculateMonthlySalaryTax(150000, { taxYear: 2027 });
// → {
//     "tax": 72000,
//     "monthly": 6000,
//     "effectiveRate": 4,
//     "slab": {
//       "over": 1200000,
//       "upTo": 2200000,
//       "fixed": 6000,
//       "rate": 11
//     },
//     "taxYear": 2027
//   }

getTaxYear('2026-11-18');
// → 2027
```

**Python**

```python
from pakdatakit import calculate_salary_tax, calculate_monthly_salary_tax, get_tax_year

calculate_salary_tax(5_000_000, tax_year=2027)
# → {
#     "tax": 802000,
#     "monthly": 66833.33,
#     "effective_rate": 16.04,
#     "slab": {
#       "over": 4100000,
#       "up_to": 5600000,
#       "fixed": 541000,
#       "rate": 29
#     },
#     "tax_year": 2027
#   }

calculate_monthly_salary_tax(150_000, tax_year=2027)
# → {
#     "tax": 72000,
#     "monthly": 6000,
#     "effective_rate": 4,
#     "slab": {
#       "over": 1200000,
#       "up_to": 2200000,
#       "fixed": 6000,
#       "rate": 11
#     },
#     "tax_year": 2027
#   }

get_tax_year('2026-11-18')
# → 2027
```

**Dart**

```dart
import 'package:pakdatakit/pakdatakit.dart';

calculateSalaryTax(5000000, taxYear: 2027);
// → {
//     "tax": 802000,
//     "monthly": 66833.33,
//     "effectiveRate": 16.04,
//     "slab": {
//       "over": 4100000,
//       "upTo": 5600000,
//       "fixed": 541000,
//       "rate": 29
//     },
//     "taxYear": 2027
//   }

calculateMonthlySalaryTax(150000, taxYear: 2027);
// → {
//     "tax": 72000,
//     "monthly": 6000,
//     "effectiveRate": 4,
//     "slab": {
//       "over": 1200000,
//       "upTo": 2200000,
//       "fixed": 6000,
//       "rate": 11
//     },
//     "taxYear": 2027
//   }

getTaxYear('2026-11-18');
// → 2027
```

**C#**

```csharp
using PakDataKit;

IncomeTax.CalculateSalaryTax(5000000, new SalaryTaxOptions { TaxYear = 2027 });
// → {
//     "tax": 802000,
//     "monthly": 66833.33,
//     "effectiveRate": 16.04,
//     "slab": {
//       "over": 4100000,
//       "upTo": 5600000,
//       "fixed": 541000,
//       "rate": 29
//     },
//     "taxYear": 2027
//   }

IncomeTax.CalculateMonthlySalaryTax(150000, new SalaryTaxOptions { TaxYear = 2027 });
// → {
//     "tax": 72000,
//     "monthly": 6000,
//     "effectiveRate": 4,
//     "slab": {
//       "over": 1200000,
//       "upTo": 2200000,
//       "fixed": 6000,
//       "rate": 11
//     },
//     "taxYear": 2027
//   }

IncomeTax.GetTaxYear("2026-11-18");
// → 2027
```

**PHP**

```php
use PakDataKit\IncomeTax;

IncomeTax::calculateSalary(5_000_000, ['taxYear' => 2027]);
// → {
//     "tax": 802000,
//     "monthly": 66833.33,
//     "effectiveRate": 16.04,
//     "slab": {
//       "over": 4100000,
//       "upTo": 5600000,
//       "fixed": 541000,
//       "rate": 29
//     },
//     "taxYear": 2027
//   }

IncomeTax::calculateMonthlySalary(150_000, ['taxYear' => 2027]);
// → {
//     "tax": 72000,
//     "monthly": 6000,
//     "effectiveRate": 4,
//     "slab": {
//       "over": 1200000,
//       "upTo": 2200000,
//       "fixed": 6000,
//       "rate": 11
//     },
//     "taxYear": 2027
//   }

IncomeTax::getTaxYear('2026-11-18');
// → 2027
```

## Reference

### calculateSalaryTax()

```ts
function calculateSalaryTax(
  annualIncome: number,
  options?: { taxYear?: number; date?: string | Date },
): SalaryTax | null;

interface SalaryTax {
  tax: number; // for the year, rounded half up to the paisa
  monthly: number;
  effectiveRate: number; // percent
  slab: { over: number; upTo: number | null; fixed: number; rate: number };
  taxYear: number;
}
```

**Returns** the tax on an annual taxable salary. Without `taxYear` or `date`, the current tax year is used; a year that is not covered returns `null`.

**Caveats.** Only the rate table is applied. The surcharge, tax credits, exemptions and allowances are not. (For tax year 2027 the surcharge on salaried individuals was withdrawn by the Finance Act 2026.) This is an estimate, not tax advice.

### calculateMonthlySalaryTax()

```ts
function calculateMonthlySalaryTax(
  monthlySalary: number,
  options?: { taxYear?: number; date?: string | Date },
): SalaryTax | null;
```

**Returns** the same result for a monthly salary (twelve times the month).

### getTaxYear()

```ts
function getTaxYear(date?: string | Date): number | null;
```

**Returns** the tax year a date falls in: 18 November 2026 is in tax year 2027.

**Related:** the [salary tax calculator](https://pakdatakit.dev/tools/salary-tax/), [data sources](https://pakdatakit.dev/data/) for the law and the date it was last checked.

Every function and type: the [income tax API reference](https://pakdatakit.dev/api/typescript/incometax/).
