Downloads and tidies the HMRC Measuring Tax Gaps tables: estimates of the difference between the tax that should in theory be paid and the tax actually collected, by tax, taxpayer type and component. Since the 2026 edition HMRC publishes a consistent time series from 2005-06, and every edition revises earlier years. Published annually in June.
Arguments
- tax
Character vector or
NULL(default = all taxes). Filter on thetaxcolumn:"VAT","Excise duty","Income Tax, NICs, Capital Gains Tax","Corporation Tax","Other taxes","Total tax gap".- tax_year
Character vector,
"latest", orNULL(default = all years). Filter to specific tax years, e.g."2024-25".- cache
Logical. Use cached file if available (default
TRUE).
Value
An hmrc_tbl with columns:
- tax_year
Character. Tax year, e.g.
"2024-25".- tax
Character. Tax group, e.g.
"VAT","Corporation Tax".- type
Character. Sub-group, e.g.
"Self Assessment","Tobacco duty", or the group total.- component
Character. Taxpayer group or duty, e.g.
"Small businesses","Cigarette duty".- gap_pct
Numeric. Tax gap as a per cent of theoretical liabilities (Table 1.1).
- gap_gbp_bn
Numeric. Tax gap in GBP billion (Table 1.2).
Details
Rows that appear only in the GBP table (avoidance and hidden economy
components) have gap_pct of NA. Estimates HMRC shows as <0.1 (below
GBP 0.05bn) are returned as NA. Each June edition revises the whole
series, so results change between editions; hmrc_meta() records the
edition's publication date.
See also
Other data fetchers:
hmrc_capital_gains(),
hmrc_corporation_tax(),
hmrc_creative_industries(),
hmrc_fuel_duties(),
hmrc_income_tax_stats(),
hmrc_inheritance_tax(),
hmrc_patent_box(),
hmrc_property_transactions(),
hmrc_rd_credits(),
hmrc_stamp_duty(),
hmrc_tax_receipts(),
hmrc_tobacco_duties(),
hmrc_vat()
Examples
# \donttest{
op <- options(hmrc.cache_dir = file.path(tempdir(), "hmrc"))
try({
gap <- hmrc_tax_gap(tax = "Total tax gap")
tail(gap)
})
#> ℹ Resolving download URL from GOV.UK Content API
#> ✔ Resolving download URL from GOV.UK Content API [376ms]
#>
#> ℹ Downloading data file
#> ✔ Downloading data file [250ms]
#>
#> ℹ Parsing data
#> ✔ Parsing data [137ms]
#>
#> # Measuring Tax Gaps
#> # Source: https://www.gov.uk/government/statistics/measuring-tax-gaps-tables
#> # Fetched 2026-09-13 19:24:26 UTC | Vintage: latest | Cells: estimates | Freq: annual | 6 rows x 6 cols
#>
#> tax_year tax type component gap_pct gap_gbp_bn
#> 15 2019-20 Total tax gap Total tax gap Total tax gap 6.0 40.1
#> 16 2020-21 Total tax gap Total tax gap Total tax gap 5.7 36.9
#> 17 2021-22 Total tax gap Total tax gap Total tax gap 6.0 44.6
#> 18 2022-23 Total tax gap Total tax gap Total tax gap 6.6 55.3
#> 19 2023-24 Total tax gap Total tax gap Total tax gap 6.0 52.8
#> 20 2024-25 Total tax gap Total tax gap Total tax gap 6.4 59.2
options(op)
# }