Type: Package
Title: Income Tax Calculations (UK)
Version: 1.0.0
Date: 2026-03-09
Description: Income tax calculations for England, Northern Ireland and Wales. Estimate annual income tax within the different taxation bands at specified levels of both taxable income and the Personal Allowance, emulating the results obtained at https://www.gov.uk/estimate-income-tax. Calculate the standard Personal Allowance at various levels of taxable income. Estimate the personal allowance required to recoup a specified amount of income tax.
License: MIT + file LICENSE
Encoding: UTF-8
Depends: R (≥ 4.1.0)
NeedsCompilation: no
Packaged: 2026-03-09 21:13:38 UTC; frzmce
Author: Mark Eisler ORCID iD [aut, cre, cph]
Maintainer: Mark Eisler <mark@markeisler.com>
Repository: CRAN
Date/Publication: 2026-03-16 16:10:03 UTC

Income Tax Calculations (UK)

Description

Income tax calculations for England, Northern Ireland and Wales. Estimate annual income tax within the different taxation bands at specified levels of both taxable income and the Personal Allowance, emulating the results obtained at <https://www.gov.uk/estimate-income-tax>. Calculate the standard Personal Allowance at various levels of taxable income. Estimate the personal allowance required to recoup a specified amount of income tax.

Details

For one of life's only two certainties—for the other, the survival package may be helpful.

Disclaimer

While every effort is made to ensure this package functions as expected, the author accepts no responsibility for the consequences of errors.

Author(s)

Mark Eisler [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-6843-3345>)

Maintainer: Mark Eisler <mark@markeisler.com>

References

GOV.UK: –

Estimate your Income Tax for the current year

Income Tax rates and allowances for current and previous tax years

Examples

## Calculate income tax for a range of salaries
incometax(12500)

incometax(25000)

incometax(75000)

incometax(125000)

incometax(150000)

Personal tax allowance adjusted to recoup a tax deficit

Description

Calculates the personal tax allowance adjusted in order to recoup a given amount of tax.

Usage

allowance(taxable, deficit = NULL, opts = tax_opts())

Arguments

taxable

numeric, annual taxable income.

deficit

numeric, tax deficit to recoup, see details.

opts

options, as created by tax_opts(), see details.

Details

Income tax deficits are recouped by adjusting the Personal Allowance. allowance() calculates the personal allowance required to recoup a specified amount of tax over the course of a year for a given taxable income. The allowance calculated can be a negative amount, in which case it may be referred to as a Pay Adjustment.

Argument deficit represents the total amount of tax to recoup, including the usual amount plus any additional outstanding deficit.

Argument opts specifying values for tax bands, rates and allowances must be provided using tax_opts(), which by default gives GOV.UK values for 2025-2027 tax years.

Value

A numeric, representing value of the Personal Allowance or if negative, Pay Adjustment, required to recoup the deficit.

Author(s)

Mark Eisler [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-6843-3345>)

References

GOV.UK: –

See Also

Other income_tax: incometax(), pers_allow(), tax_opts()

Examples


####
## Tax deficit of £600 at salary no more
## than the standard personal allowance
allowance(12570, 600)

## Demonstrate that correct amount of £600, is recouped
incometax(12570, 9561)

####
## Tax deficit of £200 at salary within 20% band 1
allowance(12570 + 1009, 200)

## This deficit is simply the usual amount of tax
incometax(12570 + 1009)

####
## Tax deficit of additional £600 at salary within 20% band
allowance(12570 + 1009, 200 + 600)

## Demonstrate that correct additional amount of £600
## i.e., a tax total of £800, is recouped
incometax(12570 + 1009, 9570)

####
## Tax deficit of £7,940 at salary within 40% band
allowance(12570 + 37700 + 1009, 7940)

## This deficit is simply the usual amount of tax
incometax(12570 + 37700 + 1009)

####
## Tax deficit of additional £600 at salary within 40% band
allowance(12570 + 37700 + 1009, 7940 + 600)

## Demonstrate that correct additional amount of £600
## i.e., a tax total of £8,540, is recouped
incometax(12570 + 37700 + 1009, 11070)

####
## Tax deficit of £42,512.40 at salary within 40% band
## (at the upper limit of the standard Personal Allowance)
allowance(125140, 42512.4)

## This deficit is simply the usual amount of tax
incometax(125140)

####
## Tax deficit of additional £600 at salary within 40% band
## (at the upper limit of the standard Personal Allowance)
allowance(125140, 42512.4 + 600)

## Demonstrate that correct additional amount of £600
## i.e., a tax total of £43,112.40, is recouped
incometax(125140, -1325.222)

####
## Tax deficit of £47,016.05 at salary within 45% band
## (above the upper limit of the Personal Allowance)
allowance(135140, 47016.05)

## This deficit is simply the usual amount of tax
incometax(135140)

####
## Tax deficit of additional £600 at salary within 45% band
## (above the upper limit of the Personal Allowance)
allowance(135140, 47016.05 + 600)

## Demonstrate that correct additional amount of £600
## i.e., a tax total of £47,616.05, is recouped
incometax(135140, -1333.333)


Income tax calculator

Description

PAYE income tax calculator for England, Northern Ireland and Wales.

Usage

incometax(income, allowance = NULL, opts = tax_opts())

## S3 method for class 'incometax'
format(x, ...)

## S3 method for class 'incometax'
print(x, ...)

Arguments

income

numeric, annual taxable income.

allowance

numeric, personal allowance or pay adjustment; see Details.

opts

options, as created by tax_opts(), see Details.

x

object of class "incometax" created by function incometax().

...

further arguments passed to or from other methods.

Details

incometax() estimates income tax payable on PAYE earnings in England, Northern Ireland and Wales, and is intended to replicate the estimates of GOV.UK Estimate your Income Tax for the current year.

Tax is paid on the amount of taxable income remaining after the Personal Allowance has been deducted, and is allocated among the basic, higher and additional rate bands. Earnings exceeding the personal allowance by an amount up to and including the upper limit of the basic rate band attract basic rate income tax; earnings exceeding the personal allowance plus the basic rate band by an amount up to and including the upper limit of the higher rate band attract higher rate income tax; and earnings exceeding the personal allowance plus the sum of the basic and higher rate bands attract additional rate income tax.

The standard Personal Allowance is the amount of taxable income on which there is no tax liability, currently £12,570. The personal allowance goes down by £1 for every £2 that adjusted net income is above an upper threshold, currently £100,000. This means the personal allowance is zero if taxable income is £125,140 or above.

Hence currently in 2026: –

See GOV.UK Income Tax rates and allowances for current and previous tax years: Tax rates and bands.

Argument allowance may be used to specify the Personal Allowance, or if negative, a K code pay adjustment; otherwise, its default value will be calculated using pers_allow(income, opts).

Argument opts specifying values for tax bands, rates and allowances must be provided using tax_opts(), which by default gives GOV.UK values for 2025-2027 tax years.

Value

incometax() returns an object of class "incometax" comprising a named numeric vector of length three, with names derived from the three tax rates provided using tax_opts() i.e., c(20%, 40%, 45%) for the 2025-2027 tax years; and numeric attributes "allowance" and "taxable", representing the personal allowance and tableable pay respectively.

print() and format() methods are provided for class "incometax".

Note

incometax() does not currently calculate National Insurance (NI) contributions, and should therefore return values equal to the estimates from the GOV.UK website (Estimate your Income Tax for the current year) with “no” as the answer to the question ‘Are you over the State Pension age?’ For NI information see: Rates and allowances: National Insurance contributions

Author(s)

Mark Eisler [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-6843-3345>)

References

GOV.UK: –

See Also

Other income_tax: allowance(), pers_allow(), tax_opts()

Examples

## Income equal to standard personal allowance
incometax(12570)

## Specifying standard personal allowance explicitly
all.equal(incometax(12570), incometax(12570, 12570))

## In practice, £9 is added to personal allowance
## before tax applied
incometax(12579)

all.equal(incometax(12579), incometax(12579, 12570))

## Base rate tax applied to earnings above personal allowance
incometax(12570 + 1009)

## ...up to base rate band limit
incometax(12570 + 37709)

## Higher rate applied to earnings above base rate band
incometax(12570 + 37700 + 1009)

## ...up to personal allowance limit of £100,000
incometax(100000)

## For every £2 of income above this limit,
## personal allowance decreases by £1
incometax(100000 + 4000)

incometax(100000 + 20000)

## Hence, at an income of £125,140,
## personal allowance is zero
incometax(125140)

## Above an income of £125,145
## additional rate tax is applied
incometax(125145)

incometax(125146)

incometax(125140 + 10000)

Personal allowance calculator

Description

Calculates the standard Personal Allowance for a given adjusted net income.

Usage

pers_allow(adj_net_income, opts = tax_opts())

Arguments

adj_net_income

numeric, adjusted net income.

opts

options, as created by tax_opts(), see details.

Details

The standard Personal Allowance is the amount of taxable income on which there is no tax liability, currently £12,570.

The personal allowance goes down by £1 for every £2 that adjusted net income is above an upper threshold, currently £100,000. This means the personal allowance is zero if taxable income is £125,140 or above.

See GOV.UK Income Tax rates and Personal Allowances.

Value

A numeric vector representing values of the Personal Allowance.

Author(s)

Mark Eisler [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-6843-3345>)

References

Income Tax rates and Personal Allowances

Personal Allowances: adjusted net income

See Also

Other income_tax: allowance(), incometax(), tax_opts()

Examples


## Create an ascending sequence of possible taxable incomes
newseq <- with(tax_opts(), round(exp(seq(log(1e5), log(std_allow * 2 + 1e5), length.out = 10)), 0))

## Calculate personal allowances on the basis of this sequence
pers_allow(newseq) |> setNames(newseq)


Tax bands, rates and allowances

Description

Options for tax bands, rates and allowances with default values for 2025-2027 tax years.

Usage

tax_opts(
  band = c(37700L, 87440L),
  rate = c(0.2, 0.4, 0.45),
  std_allow = 12570L,
  allow_upper = 100000L
)

Arguments

band

a numeric vector giving the width of the basic and higher rate bands.

rate

a numeric vector giving the basic, higher and additional tax rates.

std_allow

the standard Personal Allowance.

allow_upper

upper income limit above which the standard allowance is reduced.

Details

Tax is paid on the amount of taxable income remaining after the Personal Allowance has been deducted, allocated among the basic, higher and additional rate bands.

Earnings exceeding the personal allowance by an amount up to and including the value of band[1] attract basic rate income tax; earnings exceeding the personal allowance plus band[1] by an amount up to and including the value of band[2] attract higher rate income tax; and earnings exceeding the personal allowance plus the value of sum(band) attract additional rate income tax. See incometax() Details for further information.

Argument allow_upper is an earnings threshold above which the personal allowance goes down by £1 for every £2 taxable income exceeds it, see GOV.UK Income Tax rates and Personal Allowances.

Value

tax_opts() returns an object of class "tax_opts", comprising a list of its four arguments.

Author(s)

Mark Eisler [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-6843-3345>)

References

GOV.UK Income Tax rates and allowances for current and previous tax years

See Also

Other income_tax: allowance(), incometax(), pers_allow(),

Examples


tax_opts()

## Standard personal allowance
with(tax_opts(), std_allow)

## Upper income limit for every £2 above which the
## standard allowance is reduced by £1
with(tax_opts(), allow_upper)

## Typical earnings threshold for higher rate income tax
with(tax_opts(), sum(std_allow, band[1]))

## Amount over personal allowance at which
## additional rate income tax becomes payable
with(tax_opts(), sum(band[1], band[2]))