How the calculator is tested
The rules the engine follows, every Inland Revenue test case it must pass before the site is published, and how the content is written, checked and corrected.
What the engine does
Every figure on this site comes from one small program, the engine, which follows Inland Revenue's payroll calculations and business rules specification for the tax year. For tax codes M and ME it annualises the pay for the period, works out a year's income tax through the brackets (10.5%, 17.5%, 30%, 33%, 39% for 2026/27), adds the ACC earners’ levy of 1.75% up to $156,641, takes off the independent earner tax credit on ME, and brings the result back down to the pay period, cutting each step back to the cent the way the specification does. Secondary codes take a flat rate from every whole dollar. Student loan, KiwiSaver, employer contributions and ESCT follow the same specification, and one-off payments follow its extra pay rules.
The rates live in one file with the Inland Revenue page each comes from. The build refuses to run if any rate is marked as unconfirmed. The same engine runs in your browser, so the calculator and the pages always agree.
The test cases
Inland Revenue publishes worked figures in its PAYE deduction tables (IR340 and IR341), its payroll specification and its employer's guide (IR335). We copied 41 of them into the test suite, and after a correction added 2 regression cases (R1 and R2) worked from the extra pay rule in the specification. Each one must match to the cent: a difference of half a cent fails. Results from the build of this page: 43 passed, 0 failed.
Not tested, because the calculator does not model them: pay made before 31 July 2024, one end-of-employment lump sum example, and two special student loan deduction cases. Where IRD's printed tables and its specification differed by one cent, the specification is used.
2026/27 tax year
| Case | Inputs | Checked | Expected | Engine | Result |
|---|---|---|---|---|---|
| T1 | $488.00 weekly on M SL | PAYE (income tax plus ACC levy) | $72.94 | $72.94 | Pass |
| Student loan | $2.88 | $2.88 | Pass | ||
| T1 | $488.00 weekly on M; KiwiSaver 3.5%, employer 3.5%, ESCT 10.5% | KiwiSaver | $17.08 | $17.08 | Pass |
| Employer KiwiSaver | $17.08 | $17.08 | Pass | ||
| ESCT | $1.78 | $1.78 | Pass | ||
| Employer KiwiSaver after ESCT | $15.30 | $15.30 | Pass | ||
| T2 | $488.00 weekly on ME | PAYE (income tax plus ACC levy) | $62.94 | $62.94 | Pass |
| T3 | $1,000.00 weekly on M SL | PAYE (income tax plus ACC levy) | $171.50 | $171.50 | Pass |
| Student loan | $64.32 | $64.32 | Pass | ||
| T3 | $1,000.00 weekly on ME | PAYE (income tax plus ACC levy) | $161.50 | $161.50 | Pass |
| T4 | $1,300.00 weekly on M SL | PAYE (income tax plus ACC levy) | $263.14 | $263.14 | Pass |
| Student loan | $100.32 | $100.32 | Pass | ||
| T4 | $1,300.00 weekly on ME | PAYE (income tax plus ACC levy) | $257.14 | $257.14 | Pass |
| T5 | $1,500.00 weekly on M SL | PAYE (income tax plus ACC levy) | $326.64 | $326.64 | Pass |
| Student loan | $124.32 | $124.32 | Pass | ||
| T5 | $1,500.00 weekly on ME | PAYE (income tax plus ACC levy) | $326.64 | $326.64 | Pass |
| T6 | $3,000.00 weekly on M SL | PAYE (income tax plus ACC levy) | $847.83 | $847.83 | Pass |
| Student loan | $304.32 | $304.32 | Pass | ||
| T7 | $3,012.00 weekly on M SL | PAYE (income tax plus ACC levy) | $852.00 | $852.00 | Pass |
| Student loan | $305.76 | $305.76 | Pass | ||
| T8 | $3,013.00 weekly on M SL | PAYE (income tax plus ACC levy) | $852.34 | $852.34 | Pass |
| Student loan | $305.88 | $305.88 | Pass | ||
| T9 | $3,846.00 weekly on M SL | PAYE (income tax plus ACC levy) | $1,150.30 | $1,150.30 | Pass |
| Student loan | $405.84 | $405.84 | Pass | ||
| T10 | $3,926.00 weekly on M SL | PAYE (income tax plus ACC levy) | $1,181.50 | $1,181.50 | Pass |
| Student loan | $415.44 | $415.44 | Pass | ||
| T11 | $2,000.00 fortnightly on M SL | PAYE (income tax plus ACC levy) | $343.00 | $343.00 | Pass |
| Student loan | $128.64 | $128.64 | Pass | ||
| T11 | $2,000.00 fortnightly on ME | PAYE (income tax plus ACC levy) | $323.00 | $323.00 | Pass |
| T12 | $5,000.00 four-weekly on M SL | PAYE (income tax plus ACC levy) | $989.04 | $989.04 | Pass |
| Student loan | $377.28 | $377.28 | Pass | ||
| T12 | $5,000.00 four-weekly on ME | PAYE (income tax plus ACC levy) | $949.04 | $949.04 | Pass |
| T13 | $15,504.00 four-weekly on M SL | PAYE (income tax plus ACC levy) | $4,648.00 | $4,648.00 | Pass |
| Student loan | $1,637.76 | $1,637.76 | Pass | ||
| T14 | $6,000.00 monthly on M SL | PAYE (income tax plus ACC levy) | $1,256.66 | $1,256.66 | Pass |
| Student loan | $478.72 | $478.72 | Pass | ||
| T15 | $16,771.00 monthly on M SL | PAYE (income tax plus ACC levy) | $5,025.58 | $5,025.58 | Pass |
| Student loan | $1,771.24 | $1,771.24 | Pass | ||
| T16 | $7,777.00 fortnightly on M SL | PAYE (income tax plus ACC levy) | $2,333.74 | $2,333.74 | Pass |
| Student loan | $821.88 | $821.88 | Pass | ||
| T17 | $3,967.00 weekly on SA SL | PAYE (income tax plus ACC levy) | $1,616.55 | $1,616.55 | Pass |
| Student loan | $476.04 | $476.04 | Pass | ||
| T18 | $860.00 weekly on ND | PAYE (income tax plus ACC levy) | $402.05 | $402.05 | Pass |
| SPEC27 | $500.03 weekly on M; KiwiSaver 4% | KiwiSaver | $20.00 | $20.00 | Pass |
| R1 | Extra pay of $5,000.00 on code SB, last four weeks $5,000.00 | Rate | 30% | 30% | Pass |
| Income tax | $1,500.00 | $1,500.00 | Pass | ||
| ACC levy | $87.50 | $87.50 | Pass | ||
| PAYE (income tax plus ACC levy) | $1,587.50 | $1,587.50 | Pass | ||
| R2 | Extra pay of $30,000.00 on code SH, last four weeks $500.00 | Rate | 33% | 33% | Pass |
| Income tax | $9,900.00 | $9,900.00 | Pass | ||
| ACC levy | $525.00 | $525.00 | Pass | ||
| PAYE (income tax plus ACC levy) | $10,425.00 | $10,425.00 | Pass | ||
| E1 | Extra pay of $30,000.56 on code M, last four weeks $10,000.00 | PAYE (income tax plus ACC levy) | $10,366.39 | $10,366.39 | Pass |
| Income tax | $9,900.18 | $9,900.18 | Pass | ||
| ACC levy | $466.21 | $466.21 | Pass | ||
| E2 | Extra pay of $15,000.00 on code M, last four weeks $15,000.00 | PAYE (income tax plus ACC levy) | $5,850.00 | $5,850.00 | Pass |
| ACC levy | $0.00 | $0.00 | Pass | ||
| E3 | Extra pay of $1,000.00 on code M, last four weeks $6,150.00 | PAYE (income tax plus ACC levy) | $347.50 | $347.50 | Pass |
| E5 | Extra pay of $1,000.00 on code SH, last four weeks $500.00 | PAYE (income tax plus ACC levy) | $317.50 | $317.50 | Pass |
| Income tax | $300.00 | $300.00 | Pass | ||
| ACC levy | $17.50 | $17.50 | Pass | ||
| E6 | Extra pay of $40,000.00 on code ST, last four weeks $4,695.00 | PAYE (income tax plus ACC levy) | $13,506.33 | $13,506.33 | Pass |
| Income tax | $13,200.00 | $13,200.00 | Pass | ||
| ACC levy | $306.33 | $306.33 | Pass |
2025/26 tax year
| Case | Inputs | Checked | Expected | Engine | Result |
|---|---|---|---|---|---|
| P1 | $1,000.00 weekly on M SL | PAYE (income tax plus ACC levy) | $170.70 | $170.70 | Pass |
| Student loan | $64.32 | $64.32 | Pass | ||
| P1 | $1,000.00 weekly on ME | PAYE (income tax plus ACC levy) | $160.70 | $160.70 | Pass |
| P2 | $2,000.00 fortnightly on M | PAYE (income tax plus ACC levy) | $341.40 | $341.40 | Pass |
| P2 | $2,000.00 fortnightly on ME | PAYE (income tax plus ACC levy) | $321.40 | $321.40 | Pass |
| P3a | $500.03 weekly on M | PAYE (income tax plus ACC levy) | $74.85 | $74.85 | Pass |
| P3b | $515.03 weekly on M | PAYE (income tax plus ACC levy) | $77.72 | $77.72 | Pass |
| P4 | Extra pay of $25,000.56 on code M, last four weeks $10,000.00 | PAYE (income tax plus ACC levy) | $8,630.77 | $8,630.77 | Pass |
| Income tax | $8,250.18 | $8,250.18 | Pass | ||
| ACC levy | $380.59 | $380.59 | Pass |
2024/25 (paid from 31 July 2024) tax year
| Case | Inputs | Checked | Expected | Engine | Result |
|---|---|---|---|---|---|
| P5 | $1,000.00 weekly on M SL | PAYE (income tax plus ACC levy) | $170.00 | $170.00 | Pass |
| Student loan | $64.32 | $64.32 | Pass | ||
| P5 | $1,000.00 weekly on ME | PAYE (income tax plus ACC levy) | $160.00 | $160.00 | Pass |
| P6 | $1,500.00 weekly on M | PAYE (income tax plus ACC levy) | $324.39 | $324.39 | Pass |
| P9 | Extra pay of $15,000.56 on code M, last four weeks $10,000.00 | PAYE (income tax plus ACC levy) | $5,146.70 | $5,146.70 | Pass |
| Income tax | $4,950.18 | $4,950.18 | Pass | ||
| ACC levy | $196.52 | $196.52 | Pass |
Sources: Inland Revenue IR340 weekly and fortnightly PAYE tables, IR341 four-weekly and monthly PAYE tables, Payroll calculations and business rules specification, IR335 Employer’s guide, for the years shown. Case labels (T1, P4 and so on) are our references to the research notes behind the suite. The expected figure is the one Inland Revenue printed, except for R1 and R2, which apply its extra pay rule to new inputs.
Checks on the published pages
A second test reads the built pages. It reruns all 25 worked examples through the engine and checks that each figure on the page matches to the cent, checks that every calculator shows a worked default result in the page itself, that translated pages stay out of search results until a fluent speaker has reviewed them, and that every English calculator and guide page has enough original text. A shared site check then looks for broken internal links and other build faults, and an advertising audit checks the number of ad units on each page. All of these must pass before anything is published.
Editorial policy
- Who writes it. Pages are drafted with the help of AI tools and then reviewed, edited and approved by James Graham, the editor. Nothing is published without that review.
- Where facts come from. Rates, thresholds and rules come from Inland Revenue: its rates pages, the PAYE tables, the payroll specification and the employer's guide. Employment rules, such as holiday pay, come from Employment New Zealand. Each guide lists its sources.
- Numbers are computed, not typed. Every dollar figure in a guide or table is worked out by the engine when the site is built, so a rate change flows through every page at once.
- Keeping it current. Rates are checked when Inland Revenue publishes the next year's tables, and whenever a law change affects PAYE. The date each page's rates were checked is shown on it.
- Independence. The site may show Google ads to stay free. Advertisers have no say in what is written, and ads are never placed above a result.
- Limits. This is general information about how PAYE works, not tax advice for your situation. For that, contact Inland Revenue or a tax adviser.
Corrections
If you think a figure is wrong, email contact@crucible.co.nz with the inputs you used and what you expected. Confirmed errors are fixed, a test is added so the same mistake cannot return, and the fix is listed here.
- 20 November 2026. The bonus calculator taxed extra pay on a secondary code (SB, S, SH, ST or SA) at the code's own flat rate. Inland Revenue's rule is to add the code's starting threshold to the annualised pay and the bonus, and use the rate for the band that total reaches. Fixed, with two new test cases (R1 and R2 in the table above).