# Tax Savings Calculator: GET /api/v1/calculator/tax-savings

> For AI agents: this page is also Markdown at [/developers/calculate-tax-savings.md](https://www.hsatrackr.com/developers/calculate-tax-savings.md). Every docs page is listed in [/developers/llms.txt](https://www.hsatrackr.com/developers/llms.txt).

Calculate projected tax savings from HSA contributions based on tax bracket and years of contribution.

```http
GET /api/v1/calculator/tax-savings
```

Savings include 7.65% FICA, which only applies when you contribute through payroll; direct contributions save income tax only.

## Parameters

| Name | In | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `contribution` | query | no | `4400` | Annual contribution in USD (0 to 100,000) |
| `federalBracket` | query | no | `22` | Federal tax bracket, percent (0 to 50) |
| `stateRate` | query | no | `5` | State income tax rate, percent (0 to 15) |
| `years` | query | no | `10` | Years to project (1 to 50) |
| `expectedReturn` | query | no | `7` | Assumed annual investment return, percent (0 to 30) |

## Example request

```bash
curl "https://www.hsatrackr.com/api/v1/calculator/tax-savings?contribution=4400&federalBracket=24&stateRate=9.3&years=30"
```

## Example response

A real response from the live handler.

```json
{
  "data": {
    "inputs": {
      "annualContribution": 4400,
      "federalBracket": "24%",
      "stateRate": "9.3%",
      "yearsToGrow": 30,
      "expectedReturn": "7%"
    },
    "results": {
      "federalSavings": 1056,
      "stateSavings": 409,
      "ficaSavings": 337,
      "annualTaxSavings": 1802,
      "totalContributions": 132000,
      "totalTaxSavings": 54054,
      "investmentValue": 415627,
      "investmentGrowth": 283627,
      "taxableAccountValue": 203610,
      "advantageVsTaxable": 212017
    }
  },
  "meta": {
    "source": "https://www.hsatrackr.com/calculators/tax-savings",
    "citation_url": "https://www.hsatrackr.com/calculators/tax-savings",
    "updated": "2026-01-01",
    "disclaimer": "This information is for educational purposes only and does not constitute tax, legal, or financial advice. Consult a qualified professional for your specific situation.",
    "api_docs": "https://www.hsatrackr.com/api/v1"
  }
}
```

## Response fields

Every response is `{ data, meta }`. `meta.citation_url` is the public page to cite.

| Field | Type | Always present |
| --- | --- | --- |
| `inputs` | object | yes |
| `results` | object | yes |

## Errors

| Status | Meaning |
| --- | --- |
| `400` | Bad request - invalid parameters |
| `429` | Rate limit exceeded (30 requests per minute per IP) |

Full contract: [openapi.json](https://www.hsatrackr.com/openapi.json). All endpoints: [API overview](https://www.hsatrackr.com/developers).
