Type: Package
Title: Income Tax Calculations (UK)
Version: 1.0.1
Date: 2026-03-24
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.2.0)
NeedsCompilation: no
Packaged: 2026-03-24 18:33:09 UTC; frzmce
Author: Mark Eisler ORCID iD [aut, cre, cph]
Maintainer: Mark Eisler <mark@markeisler.com>
Repository: CRAN
Date/Publication: 2026-03-24 19:20:02 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.

Package Source

Source code on GitHub.

Disclaimer

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

Documentation Index

Index of help topics:

Fiscal-package          Income Tax Calculations (UK)
allowance               Personal tax allowance adjusted to recoup a tax
                        deficit
incometax               Income tax calculator
pers_allow              Personal allowance calculator
tax_opts                Tax bands, rates and allowances

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, round10 = TRUE, opts = tax_opts())

Arguments

taxable

numeric, annual taxable income.

deficit

numeric, tax deficit to recoup, see details.

round10

logical, whether or not to round down return value to nearest £10; default TRUE.

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 of income tax as calculated by incometax(taxable), plus the additional outstanding tax deficit. If round10 = TRUE, as by default, the return value will be rounded down to the nearest £10, in keeping with GOV.UK tax codes. Rounding down ensures that, if anything, the required tax is very slightly overestimated and not underestimated. 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 tax 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()

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

Examples


###
## Personal Allowance to recoup a given tax deficit

## An annual income of £13,579 i.e., £1,009 above the £12,570
## standard Personal Allowance, usually attracts £200 in income tax: –
incometax(13579)

## At this income, the Personal Allowance required 
## to recoup an additional £600 tax deficit is: –
allowance(13579, 200 + 600)

## Using this allowance, the additional amount of at least £600 tax
## is recouped as intended i.e., total income tax at least £800: –
incometax(13579, 9570)

###
## Pay Adjustment to recoup a given tax deficit

## An annual income of £112,570, at which the standard Personal Allowance
## decreases by half, usually attracts £34,970.4 in income tax: –
incometax(112570)

## At this income, the pay adjustment required 
## to recoup an additional £3,500 tax deficit is: –
allowance(112570, 34970.4 + 3500)

## Using this pay adjustment, taxable income is adjusted to £115,030
## and the additional amount of at least £3,500 tax is recouped
## as intended i.e., total income tax at least £38,472:–
incometax(112570, -2460)

## Not run: 
###
## For further examples, see: -
	vignette("incometax")

## End(Not run)

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 income 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 rates. After deduction of the Personal Allowance, if any (see below): income up to and including the upper limit of the basic rate band attracts basic rate tax; income exceeding the basic rate band by an amount up to and including the upper limit of the higher rate band attracts higher rate tax; and income exceeding the sum of the basic and higher rate bands attracts additional rate tax.

The standard Personal Allowance is the amount of annual 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 annual 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 a bespoke 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.

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

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., 20%, 40% and 45% for the 2025-2027 tax years; and numeric attributes "allowance" and "taxable", representing the personal allowance and tableable pay respectively.

Note

  1. In practice, an additional £9 annual income is allowed before basic and higher rate tax are applied.

  2. An additional £6 annual income is allowed before additional rate tax is applied; the additional £6 is decreased by £1 for every further £2 increase in income beyond £125,146.

  3. 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 “yes” 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()

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

Examples

## Up to the standard Personal Allowance,
## income attracts no tax 
incometax(12570)

## After the standard Personal Allowance (and a further £9),
## income attracts base rate tax
incometax(12570 + 9 + 1000)

## After the standard Personal Allowance (and a further £9),
## income above the base rate band attracts higher rate tax
incometax(12570 + 9 + 37700 + 1000)

## For every £2 of income above its £100,000 upper limit,
## the standard Personal Allowance decreases by £1
incometax(100000 + 20000)

## At an income of £125,140 or above,
## there is no standard Personal Allowance
incometax(125140)

## Income above the base plus higher rate
## bands attracts additional rate tax
incometax(37700 + 87439 + 10000)

##  –  §  –

## Specifying a bespoke Personal Allowance
## explicitly using the `allowance` argument
incometax(6570 + 9 + 10000, 6570)

## Specifying a pay adjustment using
## a negative `allowance` argument
incometax(125139, -10000)

## Not run: 
###
## For further examples, see: -
    vignette("incometax")

## End(Not run)

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 standard Personal Allowance goes down by £1 for every £2 that adjusted net income is above an upper threshold, currently £100,000 and hence falls to 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 a named ascending sequence of possible taxable incomes
## starting at upper threshold of the standard Personal Allowance
(newseq <-
    with(tax_opts(), seq(allow_upper, std_allow * 2 + allow_upper, length.out = 11)) |>
    setNames(nm = _)
)

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

## Result is as expected
all.equal(pers_allow(newseq), with(tax_opts(), std_allow - (newseq - allow_upper) / 2))

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, 87439L),
  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 rates.

Income exceeding the personal allowance by an amount up to and including the value of band[1] attract basic rate income tax; income 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 income 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 income 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 income 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]))