Coastline Open the calculator →
Methodology

Methodology archive: engines not offered in the app

Coastline was built with five separate tax engines — the United States, Canada, the United Kingdom, New Zealand and Hong Kong — plus one shared engine for nine zero-income-tax jurisdictions, and all of them remain in the code, each still covered by its own verification suite. Since September 2026 the calculator offers the United States only: there is no country control in the app, the other engines have no entry point, and their tax constants are not being updated, so they will drift from the statute as each country’s annual changes land. Everything below documents what those engines implement, because the figures on this page were computed by running them and a reader who finds an old link deserves the record — but none of it describes something the app will do for you today.

One chassis, fourteen engines

The projection is dispatched by country. runProject hands a Canadian plan to the Canadian loop, a British plan to the British loop, and so on — five separate implementations in all, plus one shared implementation for the nine zero-income-tax jurisdictions, which need only one because they share a single rule: there isn’t one. They are separate loops, not branches inside a common tax function, which is the whole point: adding New Zealand cannot perturb what a US plan computes, and a change to a US bracket cannot leak into a Hong Kong return.

What they do share is everything that is genuinely country-neutral: career phases, dual incomes, housing and amortising mortgages, rental property, personal and student debt, asset allocation and glide paths, the market simulator, and the shape of the results table. That is why a new country costs roughly two thousand lines rather than a rewrite — and it is also the thing a sceptical reader should push on, so here it is stated plainly.

Row-field reuse, and what it does not mean

The results table has three account slots — taxable, tax-deferred, tax-free — plus one public-pension line. Each engine maps its own country’s accounts onto those slots, so the table, the chart, the share codes and the simulator all work unchanged:

The three account slots, as each engine fills them — short labels, taken from the app’s own country registry rather than typed here.
CountryTaxableTax-deferredTax-freePublic pension
United Statesbrokerage401kRoth 401(k)/IRASocial Security
Canadanon-registeredRRSP/RRIFTFSACPP + OAS
United KingdomGIApensionISANew State Pension
New ZealandinvestmentsKiwiSavernone — slot is emptyNZ Super
Hong KonginvestmentsMPFnone — slot is emptynone
Nine zero-tax jurisdictionsinvestmentsnonenonenone

Reusing the slot does not mean reusing the rules. Every rate, threshold, contribution cap, access age, withdrawal ordering and benefit in each column is that country’s own, implemented from that country’s primary sources. Where a country genuinely has no such account — New Zealand and Hong Kong have no tax-free wrapper at all, and none of the zero-tax jurisdictions offers a resident a local retirement wrapper — the slot is held at zero rather than quietly repurposed, and any balance you had entered there is folded into the ordinary investment account so switching a plan between countries never makes money disappear.

Those three slots are the tax-relevant ones, not the whole plan. Alongside them every engine carries cash savings, home equity with a real amortising mortgage, rental property, business equity, pensions and annuities, and student, mortgage, auto and consumer debt. In the countries where it matters, withdrawals follow an explicit order — in the US: cash, then HSA, then 457(b), then brokerage, then a penalised 401(k) draw — because which account you draw from changes the tax bill, and therefore how long the money lasts. In New Zealand, Hong Kong and the zero-tax jurisdictions the ordering barely matters, and the engine says so rather than implying a lever that does nothing.

The same year, seven ways

One salaried worker, age 40, single, no children, no starting balances, zero inflation and zero investment return, so the first year is pure statutory arithmetic you can check against the published rate tables:

Year-one tax on a salary, computed by each engine at build time. Amounts are in each country’s own currency and no exchange rate is applied — this shows which columns each engine fills, not which country is cheapest.
JurisdictionSalaryIncome taxPayrollCounted as taxEffective
United States — Texas$100,000$13,170FICA $7,650$20,82020.8%
Canada — Ontario$100,000$20,306CPP + EI $5,770$26,07526.1%
UK — England£60,000£11,432NI £3,211£14,64324.4%
UK — Scotland£60,000£13,182NI £3,211£16,39327.3%
New Zealand$100,000$22,878ACC $1,750$24,62824.6%
Hong KongHK$600,000HK$56,290MPF HK$18,000 †HK$56,2909.4%
United Arab EmiratesAED 400,000AED 0noneAED 00.0%

† Hong Kong’s mandatory MPF contribution is shown because it comes out of the payslip, but it is excluded from the tax total and from the effective rate: the money never leaves the household — it lands in the member’s own MPF pot the same year. Counting forced saving as tax would overstate a Hong Kong salary’s burden while the net-worth line stayed identical. Canada’s income-tax column combines federal and provincial tax; the UK’s combines the reserved rates with the Scottish differential.

Canada

A separate implementation, per-spouse rather than joint: federal and thirteen provincial schedules with the enhanced basic personal amount, age, pension and employment credits, the Ontario surtax and health premium, the Quebec abatement, non-eligible dividend gross-up with the dividend tax credit, and the 50% capital-gains inclusion rate. CPP/CPP2 and EI payroll (with Quebec’s QPP and EI rates), CPP claim-age adjustment, OAS with deferral and the 15% recovery tax, and a simplified GIS. RRSP room is tracked per person and TFSA room as one household pool with withdrawals restoring the following year; RRIF conversion at 71 applies the statutory minimums. Charitable giving gets Canada’s credit — 14% on the first $200 of gifts and 29/33% above, plus a provincial credit — not a US-style deduction. The Canada Child Benefit is modeled as tax-free cash, income-tested on family net income, and the “Roth conversion” controls drive an RRSP meltdown instead.

What it simplifies. Provincial credits are the provincial basic personal amount only; QPIP and provincial health premiums outside Ontario are ignored. Non-registered dividends and interest are taxed at withdrawal rather than annually. The five-year carry-forward of unused donations, the student-loan interest credit, GIS earned-income exemptions, the RRIF spousal-age election, CPP sharing and rental CCA recapture are not modeled. GIS deliberately uses prior-year household income, which is how the supplement actually works — the July-to-June GIS year is set from the income reported on last year’s return. The OAS recovery tax is assessed on the same year’s net income, which is what s.180.2 charges: the prior-year figure only sets what CRA withholds month to month, and the return trues it up.

United Kingdom

UK tax is individual, always — there is no joint assessment of any kind, so a couple is simply two taxpayers with two Personal Allowances, two sets of bands, two National Insurance records and two ISA allowances. The engine implements:

What it simplifies. There is one pension-pot input and one ISA input; for a couple the pot is treated as their combined pots with draws split 50/50 across two tax returns, which is right for two similar pots and optimistic where one partner holds everything. Contributions above the Annual Allowance are capped rather than allowed and then charged, and the three-year carry-forward is not modeled — both make the model slightly conservative about how much can be sheltered. The Money Purchase Annual Allowance is carried in the constants but not enforced. A defined-benefit scheme’s Pension Input Amount uses the cash contribution rather than the 16× accrual formula. Marriage Allowance, the Blind Person’s Allowance, Rent-a-Room, the trading and property allowances, Business Asset Disposal Relief and the venture-capital schemes are not modeled. Council tax, VAT, Stamp Duty Land Tax and Inheritance Tax are outside the model, exactly as their US and Canadian equivalents are.

New Zealand

New Zealand is the country where a naive model goes most badly wrong, because the headline fact is only half the story.

There is no capital gains tax. Every withdrawal from every account in the NZ engine is untaxed — an investment sale realises nothing taxable and a KiwiSaver withdrawal from 65 is exempt by statute. The per-year solver that the US, Canadian and UK engines need in order to find the gross draw that nets a given spending need is simply unnecessary here, because net equals gross exactly.

But investment income is taxed every year anyway. A multi-rate PIE — which is what every KiwiSaver fund and every mainstream managed fund is — pays tax annually at each investor’s Prescribed Investor Rate (10.5%, 17.5% or 28%), and a fund holding international shares is taxed on a deemed 5% of opening market value under the Fair Dividend Rate, whether or not it distributed anything and whether or not it went up. Isolated in the engine: a NZ$1,000,000 fund earning nothing and paying out nothing is still assessed on NZ$50,000 of deemed income, costing NZ$5,250 at the 10.5% rate that balance attracts on its own, so the balance falls to NZ$994,750 in one year while the directly-held equivalent stays at NZ$1,000,000. Modelling “no CGT” without this would overstate a forty-year New Zealand projection enormously, so nzPieMode exposes both ends of the genuine range: PIE and offshore funds, or directly-held New Zealand and Australian shares under the FIF de minimis, where there really is no annual investment tax.

Also implemented: five progressive bands on one pool of income with no tax-free threshold — the first dollar is taxed; the ACC earners’ levy at 1.75% of liable earnings up to the cap, at every age, with no State-Pension-age exemption and never on NZ Super, rent, interest or dividends; ESCT, which takes 10.5–39% of every employer KiwiSaver dollar before it reaches the account, so a 3.5% employer contribution is 2.45% in the pot for a 30%-ESCT earner; the KiwiSaver government contribution; Working for Families (Family Tax Credit plus In-Work Tax Credit, abated at 27.5c per dollar of family income over the threshold); student loan repayments with no forgiveness scheme of any kind; charitable giving as a one-third credit rather than a deduction; rental profit with mortgage interest fully deductible again since 1 April 2025 but residential losses ring-fenced; and NZ Super at 65 — flat, universal, not means-tested, with no early-claim reduction and no deferral uplift, so the engine supplies the statutory amount itself.

KiwiSaver is TTE, not EET: the member’s own contribution gets no deduction, and in exchange withdrawals from 65 are tax-free. Before 65 the account is unreachable — no penalty option, no sliding scale — so an early retiree bridges from ordinary investments and cash. There is no minimum drawdown, ever.

What it simplifies, and one honest coin-flip. New Zealand does not index its income-tax thresholds — they were unchanged from 2010 to 2024 — so there is no correct answer about the next forty years. The engine’s default inflates them, which assumes periodic catch-up adjustments like the one legislated in 2024; nzFreezeThresholds switches to the nominally-frozen case so the fiscal-drag scenario can be stress-tested deliberately. Neither is law; the choice is surfaced rather than hidden. Beyond that: the Fair Dividend Rate is applied to the whole balance in PIE mode (a real fund’s Australasian holdings are outside the FIF rules, so this is the conservative end), the comparative-value method is not modeled, the PIR uses the current year’s income rather than the better of the last two, ESCT likewise uses the current year, KiwiSaver first-home and hardship withdrawals are not modeled, excess imputation and donation credits are forfeited rather than carried forward, and there is no building depreciation because residential buildings have been at 0% since 2011. The tax year runs 1 April to 31 March and the app projects calendar years; projection year Y is treated as tax year Y/Y+1. GST sits inside your spending figure. There is no estate, inheritance, gift or stamp duty in New Zealand to model.

Hong Kong

Hong Kong is territorial and schedular: three separate taxes (salaries, profits, property) and no general income tax at all. For a household plan that means, stated plainly and without hedging: no capital gains tax on shares, property or a business sale at any size or holding period; no dividend tax, no tax on bank interest; no sub-national income tax; no estate duty, no VAT, no payroll tax. It also means two absences that matter more than the presences:

Salaries tax is computed both ways, every year. That two-way comparison is the Hong Kong system: progressive rates on income after allowances and deductions, versus the two-tiered standard rate (15% up to HK$5,000,000 of net income, 16% above) on income before allowances — and the taxpayer pays the lower, exactly as the Inland Revenue Department computes it. The engine runs both and reports which won. At a HK$3,000,000 salary for the single filer modelled here, the progressive route gives HK$464,290 and the standard rate HK$447,300, so the engine charges HK$447,300. The crossover for that filer sits at about HK$2,160,000 of salary; above it, the average rate asymptotes towards the standard rate instead of climbing to the top marginal rate.

Also implemented: profits tax on an unincorporated business at the two-tiered 7.5%/15%; property tax at 15% of Net Assessable Value (rent less the 20% statutory allowance, with no deduction for mortgage interest); the Personal Assessment election, computed both ways and taken when it is cheaper — the only route by which a landlord’s mortgage interest becomes deductible; separate spousal taxation, which is Hong Kong’s default, with the joint-assessment election and the choice of which spouse claims the transferable allowances both evaluated and the cheaper taken; the basic, married, child, single-parent and dependent-parent allowances; and the deductions for mandatory MPF, TVC and qualifying annuity premiums, home loan interest, domestic rent for renters, and approved charitable donations.

MPF is mandatory 5% employee and 5% employer on relevant income between HK$85,200 and HK$360,000 a year, deductible up to HK$18,000, locked until 65 (or 60 for a member who has genuinely ceased all employment), with no penalised early access at any age and no minimum drawdown ever. Withdrawals are tax-free. A Hong Kong retiree with no rental income and no annuity therefore pays literally zero tax, and the engine says so rather than inventing a plausible-looking number.

What it simplifies. The one-off Budget tax reduction is not applied: recent Budgets have waived salaries tax up to a cap, but the cap is re-decided annually and has ranged from HK$1,500 to HK$10,000 in six years, so projecting one forward would invent a permanent tax cut. Owner distributions are treated as the profit of an unincorporated business chargeable to profits tax, not as tax-free dividends, because a Hong Kong company pays profits tax before distributing and that entity-level tax sits outside this household model. Rental “rates” are inside the rental module’s operating expenses rather than separately identified, which overstates Net Assessable Value slightly. The additional dependent-parent allowance, disability allowances, self-education and elderly residential care expenses are not modeled. Nor are the rental value of employer-provided quarters, share-option gains, or the territorial source rules for time spent outside Hong Kong. Stamp duty is outside the model. The year of assessment runs 1 April to 31 March and the app projects calendar years, so row 2026 is charged at 2026/27 rates.

The nine zero-income-tax jurisdictions

The United Arab Emirates, Qatar, Kuwait, Bahrain, Saudi Arabia, the Bahamas, the Cayman Islands, Monaco and Brunei Darussalam share one engine because they share one rule. Gross equals net. There is no income tax, no capital gains tax, no tax on dividends, interest or rent, no payroll income tax and no sub-national tax; every tax column in the app is exactly zero in every year of every projection, and a verification suite exists specifically to prove that.

The honesty of that engine depends on what it therefore says it does not contain:

If you are a US citizen living abroad

This is the single most likely way a reader of the international pages gets misled, so it gets its own heading. The United States taxes its citizens on worldwide income wherever they live. A US citizen or green-card holder resident in Dubai, London, Auckland or Hong Kong still files a US return. The Foreign Earned Income Exclusion and the foreign housing exclusion often reduce the bill on employment income to nothing, but US tax on investment income and capital gains is not excluded, and neither are the reporting obligations.

Coastline models the local system. It does not model the interaction of two tax systems, a tax treaty, or the foreign tax credit. If citizenship-based taxation reaches you, run a US scenario as well and treat the two as bounds rather than one as the answer — and take that particular question to a cross-border specialist, not to a calculator.

Their checks

Assertions by engine, as the suites themselves report them.
EngineSuitesAssertionsWhat they pin
Canadaself-test, accuracy, share-code round-trip274federal and 13 provincial schedules, CPP/EI, OAS clawback, RRSP/TFSA room
United Kingdomself-test, accuracy, share-code round-trip268stacking order, three jurisdictions, NI, UFPLS, ISA/GIA, frozen thresholds
New Zealandself-test, accuracy, share-code round-trip297PIE/PIR, Fair Dividend Rate, ACC, ESCT, Working for Families, NZ Super
Hong Kongself-test, accuracy, share-code round-trip299both salaries-tax methods, Personal Assessment, joint-assessment election, MPF
Nine zero-tax jurisdictionsself-test, accuracy, share-code round-trip435every tax column proved exactly zero; each gratuity formula against its statute

Their sources

The US methodology →

Keep exploring