npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

uk-tax-calc-2025

v1.0.0

Published

Complete UK tax calculator for 2025/26 — Income Tax, National Insurance, Student Loan, Pension, Dividend Tax & Stamp Duty. Covers England, Scotland, Wales & NI.

Downloads

112

Readme

uk-tax-calculator

Complete UK tax calculator for 2025/26. HMRC-accurate Income Tax, National Insurance, Student Loan, Pension, Dividend Tax & Stamp Duty calculations.

Covers England, Scotland, Wales & Northern Ireland.

Try the full interactive calculator at ukcalculator.com

Install

npm install uk-tax-calculator

Quick Start

const { calculateTakeHome } = require('uk-tax-calculator');

const result = calculateTakeHome({
  salary: 50000,
  taxYear: '2025/26',
  region: 'england',
  studentLoan: 'plan2',
  pensionPercent: 5
});

console.log(result);
// {
//   gross: 50000,
//   incomeTax: 7486,
//   nationalInsurance: 2879,
//   studentLoan: 2043,
//   pension: 2500,
//   totalDeductions: 14908,
//   takeHome: 35092,
//   monthlyNet: 2924.33,
//   effectiveTaxRate: 29.82,
//   ...
// }

API

calculateTakeHome(options)

All-in-one take-home pay calculator.

| Option | Type | Default | Description | |--------|------|---------|-------------| | salary | number | required | Annual gross salary in £ | | taxYear | string | '2025/26' | Tax year | | region | string | 'england' | 'england', 'scotland', or 'wales' | | studentLoan | string | 'none' | 'plan1', 'plan2', 'plan4', 'plan5', 'postgraduate' | | pensionPercent | number | 0 | Pension contribution % | | pensionMethod | string | 'salary_sacrifice' | 'salary_sacrifice' or 'relief_at_source' |

calculateIncomeTax(grossSalary, options?)

Income tax with full band breakdown. Supports England and Scottish rates.

const { calculateIncomeTax } = require('uk-tax-calculator');

const tax = calculateIncomeTax(75000, { region: 'scotland' });
console.log(tax.incomeTax);     // Total tax
console.log(tax.breakdown);     // Per-band breakdown

calculateEmployeeNI(grossSalary, options?)

Employee National Insurance contributions.

const { calculateEmployeeNI } = require('uk-tax-calculator');
const ni = calculateEmployeeNI(45000);
console.log(ni.totalNI);  // £2,594.40

calculateEmployerNI(grossSalary, options?)

Employer NI with optional Employment Allowance.

const { calculateEmployerNI } = require('uk-tax-calculator');

// Without Employment Allowance
const ni = calculateEmployerNI(35000);

// With Employment Allowance (£10,500 off)
const niEA = calculateEmployerNI(35000, { employmentAllowance: true });

calculateStudentLoan(grossSalary, options?)

Student loan repayments for all plan types.

const { calculateStudentLoan } = require('uk-tax-calculator');
const loan = calculateStudentLoan(40000, { studentLoan: 'plan2' });
console.log(loan.repayment);  // Annual repayment

calculateDividendTax(dividendIncome, otherIncome, options?)

Dividend tax considering £500 allowance and interaction with salary bands.

const { calculateDividendTax } = require('uk-tax-calculator');
const div = calculateDividendTax(15000, 40000);
console.log(div.tax);            // Tax on dividends
console.log(div.effectiveRate);  // Effective dividend tax rate %

calculateStampDuty(propertyPrice, options?)

SDLT (England), LBTT (Scotland) & LTT (Wales). Supports first-time buyer relief and additional property surcharge.

const { calculateStampDuty } = require('uk-tax-calculator');

// Standard purchase
const sd = calculateStampDuty(450000);

// First-time buyer
const ftb = calculateStampDuty(300000, { firstTimeBuyer: true });

// Second home in Scotland
const scot = calculateStampDuty(350000, {
  region: 'scotland',
  additionalProperty: true
});

Tax Year 2025/26 Rates

| Rate | Threshold | |------|-----------| | Personal Allowance | £12,570 | | Basic Rate (20%) | £12,571 – £50,270 | | Higher Rate (40%) | £50,271 – £125,140 | | Additional Rate (45%) | Over £125,140 | | Employee NI (8%) | £12,570 – £50,270 | | Employee NI (2%) | Over £50,270 | | Employer NI (15%) | Over £5,000 |

Full rates and thresholds at ukcalculator.com/2025-26-income-tax-bands-calculator

Links

License

MIT — UKCalculator