Calculators
Roth vs Traditional break-even API
Compare after-tax terminal values of an equal gross contribution: Roth (post-tax in, tax-free out) vs Traditional (pre-tax in, taxed at the retirement rate out), compounding at the annual return over N years, returning both terminal values, the difference, and a recommendation. Estimate only; ignores limits/RMDs. Answers 'Roth or Traditional 401k','which IRA wins if my retirement rate is lower','after-tax value of each','break-even tax rate'.
Price$0.01per request
MethodPOST
Route/v1/calc/tax-roth-vs-traditional
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
taxrothtraditionalira401kretirementbreak-evencalc
API URL
Integration docshttps://x402.hexl.dev/v1/calc/tax-roth-vs-traditionalExample request
{
"contribution": 10000,
"years": 30,
"annualReturn": 0.07,
"currentTaxRate": 0.24,
"retirementTaxRate": 0.22
}Example response
{
"contribution": 10000,
"years": 30,
"annualReturn": 0.07,
"currentTaxRate": 0.24,
"retirementTaxRate": 0.22,
"roth": {
"afterTaxContribution": 7600,
"terminalAfterTax": 57853.14
},
"traditional": {
"preTaxContribution": 10000,
"terminalGross": 76122.55,
"terminalAfterTax": 59375.59
},
"difference": 1522.45,
"recommended": "traditional",
"interpretation": "Traditional wins when your retirement tax rate is below your current rate.",
"note": "Estimate. Compares after-tax terminal value of an equal gross contribution; ignores contribution limits and RMDs."
}Input schema
{
"type": "object",
"required": [
"contribution",
"years",
"annualReturn",
"currentTaxRate",
"retirementTaxRate"
],
"properties": {
"contribution": {
"type": "number",
"description": "Gross contribution in USD",
"examples": [
10000
]
},
"years": {
"type": "number",
"examples": [
30
]
},
"annualReturn": {
"type": "number",
"description": "Annual return as a decimal",
"examples": [
0.07
]
},
"currentTaxRate": {
"type": "number",
"description": "Current marginal rate as a decimal 0-1",
"examples": [
0.24
]
},
"retirementTaxRate": {
"type": "number",
"description": "Expected retirement rate as a decimal 0-1",
"examples": [
0.22
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}