---
title: "Roth vs traditional contribution comparator"
method: POST
path: "/v1/roth-vs-traditional"
tags: ["Retirement"]
---

# Roth vs traditional contribution comparator

`POST /v1/roth-vs-traditional`

## Request

- Base URL: `https://api.numeratica.com`
- URL: `https://api.numeratica.com/v1/roth-vs-traditional`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Compares a Roth vs a traditional (pre-tax) retirement contribution on an apples-to-apples, after-tax basis. The same annual dollars go into either account; the traditional path also invests its up-front tax saving in a taxable side account (matching the out-of-pocket cost), whose gains are taxed at the end. Roth withdrawals are tax-free; traditional withdrawals are taxed at the retirement marginal rate. Returns each path's after-tax future value, the Roth advantage, the recommendation, and the breakeven retirement rate. Deterministic; not advice.

## Request body

- RothVsTraditionalRequest
  - `annual_contribution` number, required: Dollars into the account each year.
  - `years` integer, required: Years until retirement.
  - `expected_return` number, required: Annual, e.g. 0.07.
  - `current_marginal_rate` number, required: Tax rate now (drives the traditional tax saving).
  - `retirement_marginal_rate` number, required: Expected rate on traditional withdrawals.
  - `invest_tax_savings` boolean: Invest the traditional path's up-front tax saving in a taxable side account (default true — the fair, equal-out-of-pocket comparison).
  - `capital_gains_rate` number: Taxes the side account's gains at the end. Omit for 0.15; set it to 0 to model the 0% long-term capital-gains bracket (a low-income retiree).

## Response `200`

The after-tax comparison

- RothVsTraditionalResponse
  - `result_id` string
  - `engine_version` string
  - `inputs` RothVsTraditionalRequest
    - `annual_contribution` number, required: Dollars into the account each year.
    - `years` integer, required: Years until retirement.
    - `expected_return` number, required: Annual, e.g. 0.07.
    - `current_marginal_rate` number, required: Tax rate now (drives the traditional tax saving).
    - `retirement_marginal_rate` number, required: Expected rate on traditional withdrawals.
    - `invest_tax_savings` boolean: Invest the traditional path's up-front tax saving in a taxable side account (default true — the fair, equal-out-of-pocket comparison).
    - `capital_gains_rate` number: Taxes the side account's gains at the end. Omit for 0.15; set it to 0 to model the 0% long-term capital-gains bracket (a low-income retiree).
  - `result` object
    - `account_future_value` number: The balance both paths accumulate in the account.
    - `roth_after_tax` number: Tax-free.
    - `traditional_account_after_tax` number: account × (1 − retirement rate).
    - `taxable_side_after_tax` number: The invested tax saving, net of cap-gains tax.
    - `traditional_after_tax` number: Account after-tax + side account.
    - `roth_advantage` number: roth − traditional (positive ⇒ Roth wins).
    - `recommended` 'roth' | 'traditional' | 'either'
    - `breakeven_retirement_rate` number: The retirement rate at which the two tie.
  - `disclaimer` string

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key.
- `405`: Method not allowed
- `429`: The key's per-minute request budget is exceeded. Retry after the delay in the Retry-After header.
- `503`: A dependency (e.g. the key store) is temporarily unavailable, or the request exceeded its compute deadline. Retryable.

---

[API](https://skmtc.dev/numeratica/apis/numeratica-financial-planning-calculations-api.md) · [All operations](https://skmtc.dev/numeratica/apis/numeratica-financial-planning-calculations-api/llms.txt) · [OpenAPI document](https://skmtc.dev/numeratica/apis/numeratica-financial-planning-calculations-api/revisions/075bcfbd1ebf?raw)
