API Endpoint
Income Tax (Generic)
Calculate estimated income tax based on income, deductions, and tax rate.
Endpoint
Also supports GET with query parameters.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
grossIncome | number | — | Gross income ($) |
deductions | number | — | Total deductions ($) |
taxRate | number | — | Tax rate (%) |
credits | number | 0 | Tax credits ($) |
Request Examples
POST (JSON body)
curl -X POST https://likeoptions.com/api/v1/calculate/tax \
-H "Content-Type: application/json" \
-d '{"grossIncome": 100000, "deductions": 50000, "taxRate": 6}'GET (query parameters)
curl "https://likeoptions.com/api/v1/calculate/tax?grossIncome=100000&deductions=50000&taxRate=6"Response
{
"kind": "tax",
"result": {
"primary": 1234.56,
"secondary": [
{ "label": "Example metric", "value": 100, "format": "money" },
{ "label": "Example percent", "value": 5.5, "format": "percent" }
]
}
}When to Use
- Estimate tax liability
- Plan tax withholding
- Compare filing scenarios
Error Handling
- 400 Bad Request — Invalid input parameters or missing required fields
- 404 Not Found — Unknown calculator kind
- 429 Too Many Requests — Rate limit exceeded (120 req/hour per IP)
- 413 Payload Too Large — Request body exceeds 16 KB
Related Endpoints
View request examples in JavaScript, Python, cURL, and more →
Tax on income and investments
- GST API endpointAPI
- Income tax calculatorCalculator
- India income tax calculatorCalculator
- GST calculatorCalculator
- How the tax estimate worksGuide