Calculators

Secondary tax code for a second income, and the year-end position

Which secondary tax code a second income takes, and what it really costs.

A secondary code is not a penalty, and almost everyone asking believes it is. It approximates the marginal rate the second income attracts on top of the first, so roughly the right amount comes out through the year, and any excess returns in the year-end square-up.

That is why year_end_position is part of the answer rather than an extra. The flat rate matches the true marginal rate only while the second income sits inside one bracket; the moment it straddles a boundary the flat rate is charged on all of it and the difference comes back as a refund.

The rates look punitive because they are not income tax rates. Each carries the 1.75% ACC earner levy inside it, and the SL variants add the 12% student loan repayment on top, so 31.75% is 30 plus 1.75. The response takes the rate apart into those components rather than making the caller do it.

The square-up covers these two income sources only. It knows nothing about other income, donations, Working for Families or an existing tailored code, so treat it as a direction and a rough size.

post/v1/secondary-tax

Request

  • Base URL: https://api.calculate.co.nz
  • URL: https://api.calculate.co.nz/v1/secondary-tax
  • Auth: API key in header X-API-Key

Request body

main_incomenumber required

Gross annual income from the main job.

secondary_amountnumber required

The second income, in the frequency given.

secondary_frequencystring

annual, monthly, fortnightly or weekly.

has_student_loanboolean

Whether a student loan is being repaid. This changes the code to its SL variant and adds 12 points to the flat rate.

Example request

{
  "has_student_loan": false,
  "main_income": 70000,
  "secondary_amount": 15000,
  "secondary_frequency": "annual"
}

Response

The IR330 code, what it deducts, and whether that leaves a bill or a refund.

disclaimerstring required

Scope and limits of this calculation.

Example response

{
  "disclaimer": "Estimate only, covering these two income sources. The year-end position ignores other income, tax credits and any tailored tax rate. Codes and rates are IRD IR330 as at 1 April 2026. Not tax advice.",
  "result": {
    "acc_component_percent": 1.75,
    "bracket": "$78,101 to $180,000",
    "flat_rate_percent": 34.75,
    "income_tax_component_percent": 33,
    "main_acc_levy": 1225,
    "main_income": 70000,
    "main_income_tax": 13220.5,
    "main_student_loan": 0,
    "secondary_income_annual": 15000,
    "secondary_net": 9787.5,
    "secondary_paye": 5212.5,
    "student_loan_component_percent": 0,
    "tax_code": "ST",
    "tax_year": "2026/27",
    "total_deducted": 19658,
    "total_income": 85000,
    "total_owed_on_combined": 19415,
    "year_end_difference": -243,
    "year_end_position": "refund"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.