How to Build a Stamp Duty Calculator
Build a stamp duty calculator that computes the property transfer tax owed on a home purchase using real tiered rate structures. Stamp duty (called SDLT in England, LBTT in Scotland, LTT in Wales, and various names globally) is one of the biggest upfront costs buyers face, and the tiered math confuses almost everyone.
What is a Stamp Duty Calculator?
A Stamp Duty Calculator is a tool that computes the property transfer tax owed when purchasing real estate. Unlike a flat tax, stamp duty in most jurisdictions uses a tiered (or 'slab' in some countries) structure where different portions of the purchase price are taxed at different rates. For example, under UK Stamp Duty Land Tax (SDLT), the first 250,000 pounds is tax-free for residential purchases, the next portion up to 925,000 is taxed at 5%, and so on. Many buyers mistakenly think the highest rate applies to the entire price, so a clear calculator showing the tiered breakdown provides genuine value. Additional surcharges often apply for second homes, buy-to-let properties, non-resident purchasers, and first-time buyers may get relief. The calculator needs to handle all these scenarios to be truly useful.
The Formula
UK SDLT Residential Rates (2025-26, standard): Up to 125,000: 0% 125,001 to 250,000: 2% 250,001 to 925,000: 5% 925,001 to 1,500,000: 10% Over 1,500,000: 12% First-Time Buyer Relief: Up to 300,000: 0% 300,001 to 500,000: 5% No relief if price exceeds 500,000 Additional Property Surcharge: +5% on each band (second homes, buy-to-let) Non-UK Resident Surcharge: +2% on each band Calculation Method (tiered, NOT slab): For a 350,000 purchase (standard rate): First 125,000 x 0% = 0 Next 125,000 (125,001-250,000) x 2% = 2,500 Next 100,000 (250,001-350,000) x 5% = 5,000 Total SDLT = 7,500 Effective Rate = 7,500 / 350,000 = 2.14%
Code Example
interface StampDutyBand {
min: number;
max: number; // Infinity for the top band
rate: number; // as decimal, e.g., 0.05 for 5%
}
interface BuyerProfile {
purchasePrice: number;
isFirstTimeBuyer: boolean;
isAdditionalProperty: boolean; // second home or buy-to-let
isNonResident: boolean;
country: "england" | "scotland" | "wales";
}
// England/NI SDLT rates 2025-26 (standard residential)
const SDLT_STANDARD: StampDutyBand[] = [
{ min: 0, max: 125000, rate: 0 },
{ min: 125001, max: 250000, rate: 0.02 },
{ min: 250001, max: 925000, rate: 0.05 },
{ min: 925001, max: 1500000, rate: 0.10 },
{ min: 1500001, max: Infinity, rate: 0.12 },
];
const SDLT_FIRST_TIME: StampDutyBand[] = [
{ min: 0, max: 300000, rate: 0 },
{ min: 300001, max: 500000, rate: 0.05 },
// If price > 500,000, first-time relief does not apply, fall back to standard
];
const ADDITIONAL_PROPERTY_SURCHARGE = 0.05; // 5% surcharge
const NON_RESIDENT_SURCHARGE = 0.02; // 2% surcharge
// Scotland LBTT rates
const LBTT_STANDARD: StampDutyBand[] = [
{ min: 0, max: 145000, rate: 0 },
{ min: 145001, max: 250000, rate: 0.02 },
{ min: 250001, max: 325000, rate: 0.05 },
{ min: 325001, max: 750000, rate: 0.10 },
{ min: 750001, max: Infinity, rate: 0.12 },
];
// Wales LTT rates
const LTT_STANDARD: StampDutyBand[] = [
{ min: 0, max: 225000, rate: 0 },
{ min: 225001, max: 400000, rate: 0.06 },
{ min: 400001, max: 750000, rate: 0.075 },
{ min: 750001, max: 1500000, rate: 0.10 },
{ min: 1500001, max: Infinity, rate: 0.12 },
];
interface StampDutyResult {
totalTax: number;
effectiveRate: number;
bandBreakdown: { band: string; taxableAmount: number; rate: number; tax: number }[];
surcharges: { name: string; amount: number }[];
totalWithSurcharges: number;
}
function calculateStampDuty(buyer: BuyerProfile): StampDutyResult {
let bands: StampDutyBand[];
// Select correct band table
if (buyer.country === "scotland") {
bands = LBTT_STANDARD;
} else if (buyer.country === "wales") {
bands = LTT_STANDARD;
} else {
// England/NI
if (buyer.isFirstTimeBuyer && buyer.purchasePrice <= 500000) {
bands = SDLT_FIRST_TIME;
} else {
bands = SDLT_STANDARD;
}
}
// Calculate tiered tax
const breakdown: StampDutyResult["bandBreakdown"] = [];
let totalTax = 0;
for (const band of bands) {
if (buyer.purchasePrice <= band.min) break;
const taxableInBand = Math.min(buyer.purchasePrice, band.max) - band.min;
const taxForBand = Math.max(0, taxableInBand) * band.rate;
totalTax += taxForBand;
if (taxableInBand > 0) {
breakdown.push({
band: `${formatCurrency(band.min)} - ${band.max === Infinity ? "+" : formatCurrency(band.max)}`,
taxableAmount: Math.max(0, taxableInBand),
rate: band.rate,
tax: taxForBand,
});
}
}
// Surcharges (applied on full price as additional % on each band)
const surcharges: { name: string; amount: number }[] = [];
if (buyer.isAdditionalProperty) {
const surcharge = buyer.purchasePrice * ADDITIONAL_PROPERTY_SURCHARGE;
surcharges.push({ name: "Additional Property Surcharge (5%)", amount: surcharge });
}
if (buyer.isNonResident && buyer.country === "england") {
const surcharge = buyer.purchasePrice * NON_RESIDENT_SURCHARGE;
surcharges.push({ name: "Non-UK Resident Surcharge (2%)", amount: surcharge });
}
const surchargeTotal = surcharges.reduce((sum, s) => sum + s.amount, 0);
return {
totalTax,
effectiveRate: totalTax / buyer.purchasePrice,
bandBreakdown: breakdown,
surcharges,
totalWithSurcharges: totalTax + surchargeTotal,
},
}
function formatCurrency(amount: number): string {
return new Intl.NumberFormat("en-GB", { style: "currency", currency: "GBP", maximumFractionDigits: 0 }).format(amount);
}How to Build It
- 1
Build the property input form with purchase price (large number input with comma formatting), country/region selector (England, Scotland, Wales, or Northern Ireland for UK, with options to add other countries), and buyer type selectors (first-time buyer, standard, additional property, non-resident).
- 2
Implement the tiered tax calculation engine that processes each band correctly. This is the core logic: for each band, calculate how much of the purchase price falls within that band's range and multiply by the band's rate. Sum across all bands for the total.
- 3
Create the band breakdown display showing a table where each row is a tax band with the taxable portion, the rate, and the tax calculated for that band. This transparency is what makes the calculator valuable since most people do not understand tiered taxation.
- 4
Add surcharge calculations for additional properties (5% on full price in England, 6% in Scotland, 4% in Wales), non-UK resident surcharge (2% in England), and any other applicable surcharges, shown as separate line items.
- 5
Implement first-time buyer relief logic with the correct conditions (England: 0% up to 300,000, 5% on 300,001 to 500,000, no relief if price exceeds 500,000). Show how much the buyer saves compared to standard rates.
- 6
Build a comparison view showing stamp duty at different price points (helpful when negotiating), or comparing the tax if buying as a first-time buyer vs additional property vs non-resident, displayed as a small table or chart.
- 7
Add an affordability context section showing the stamp duty as a percentage of the total purchase cost, monthly equivalent if added to a mortgage, and comparison to other upfront costs (solicitor fees, survey, mortgage fees) for a complete picture of buying costs.
Key Features to Include
Accurate tiered calculation for England (SDLT), Scotland (LBTT), and Wales (LTT) with their distinct rate bands and thresholds
First-time buyer relief calculator showing exact savings compared to standard rates
Additional property and buy-to-let surcharge calculations (5% in England, 6% in Scotland)
Non-UK resident surcharge calculation (2% added to all bands)
Band-by-band breakdown table showing exactly how the tax is calculated at each tier
Effective tax rate display so buyers can quickly understand the real percentage they are paying
Price comparison slider showing how stamp duty changes across a range of property prices near the user's target
Monetization Strategies
Lead generation for mortgage brokers and conveyancing solicitors is the highest-value path. Property buyers actively seeking stamp duty info are at the decision stage of purchasing
Affiliate partnerships with online conveyancing services, mortgage comparison sites (Habito, Trussle), and property search platforms (Rightmove, Zoopla)
Display ads targeting property buyers, a premium advertising demographic with high intent and high transaction values
Premium features like a full buying cost calculator (stamp duty + solicitor + survey + mortgage fees), stamp duty on commercial property, and corporate vehicle purchase analysis
Embed/widget licensing for estate agent websites and property listing portals who want stamp duty calculators on their listing pages
Recommended Tech Stack
Frontend
Next.js with Tailwind CSS, a number input with comma formatting (react-number-format), and Recharts for the price comparison chart showing duty at different price points
Backend
No backend needed. All tax band data and calculations run client-side. Store rate tables in a versioned JSON config file for easy annual updates when budgets change thresholds
Hosting
Vercel or Cloudflare Pages. The calculator is fully static and fast-loading. Create SEO-optimized pages for each scenario (first-time buyer SDLT calculator, Scotland LBTT calculator, etc.) for organic search traffic
Related Keywords (41 in database)
These are real search terms people use. Build tools targeting these keywords for organic traffic.
Stamp Duty Calculator Qld
Volume 300
Stamp Duty Calculator Nsw
Volume 300
Stamp Duty Qld Calculator
Volume 150
Stamp Duty Calculator Vic
Volume 150
Queensland Stamp Duty Calculator
Volume 150
Get access to all 41 keywords with search volume data.
Ready to find your next tool idea?
Get access to 99,479+ validated tool ideas with search volume data. Find profitable niches and start building.
Get Full AccessRelated Guides
How to Build a Tax Calculator
calculator · 1,011 keywords
How to Build a Loan Calculator
calculator · 700 keywords
How to Build a OSU GPA Calculator
calculator · 609 keywords
How to Build a Mortgage Calculator
calculator · 479 keywords
How to Build a Sales Tax Calculator
calculator · 173 keywords
How to Build a How Much Calculator
calculator · 105 keywords