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`.
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
2-letter country code (e.g., US, CA)
State/province code (e.g., CA, NY, ON)
Annual income amount
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)
Total tax deductions amount (Default: 0)
Total tax credits amount (Default: 0)
Set to true for self-employed tax calculations (US only) (Default: False)
Tax year in YYYY format (e.g., 2024). If not specified, the latest year will be used.