---
title: "Roth vs traditional retirement accounts"
method: GET
path: "/api/v1/calculate/roth-vs-traditional"
---

# Roth vs traditional retirement accounts

`GET /api/v1/calculate/roth-vs-traditional`

## Request

- Base URL: `https://everycalc.xyz`
- URL: `https://everycalc.xyz/api/v1/calculate/roth-vs-traditional`
- Auth: none declared

Compares a Roth and a traditional retirement account at the same pre-tax annual contribution: the Roth invests what is left after tax today and is tax free at withdrawal, the traditional invests the full amount and is taxed at the retirement rate. Reports the winner, both after-tax values, and the tax each side pays. Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.

## Query parameters

- `age` number
- `retirement_age` number
- `annual_contribution` number, required
- `annual_return_pct` number
- `current_tax_rate_pct` number
- `retirement_tax_rate_pct` number

## Response `200`

Calculation result.

## Other responses

- `400`: Invalid input.

---

[API](https://skmtc.dev/everycalc/apis/everycalc-api.md) · [All operations](https://skmtc.dev/everycalc/apis/everycalc-api/llms.txt) · [OpenAPI document](https://skmtc.dev/everycalc/apis/everycalc-api/revisions/a4bd5db0868a?raw)
