← Back to API Ninjas
GET/v1/incometaxcalculator

Calculates detailed tax information based on income, location, and filing status.

Calculates income tax for the United States or Canada from income, location, and filing status, including state or provincial tax. Requires `country`, `region`, `income`.

API Ninjas·$0.001 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "api-ninjas", path: "/v1/incometaxcalculator", query: { "country": "example", "region": "example", "income": 123 } }); console.log(output);

Query parameters

countryrequired
string

2-letter country code (e.g., US, CA)

regionrequired
string

State/province code (e.g., CA, NY, ON)

incomerequired
number

Annual income amount

filing_status
string

Required when country is US. Tax filing status. Possible values: single, married (married filing jointly), married_separate (married filing separately), or head_of_household (Allowed: single, married, married_separate, head_of_household)

deductions
number

Total tax deductions amount (Default: 0)

credits
number

Total tax credits amount (Default: 0)

self_employed
boolean

Set to true for self-employed tax calculations (US only) (Default: False)

tax_year
string

Tax year in YYYY format (e.g., 2024). If not specified, the latest year will be used.

    Orthogonal - Giving AI agents the tools they need.