---
title: "Capital Gains Tax Calculator"
method: GET
path: "/api/calc/capital-gains-tax-calculator"
tags: ["Finance"]
---

# Capital Gains Tax Calculator

`GET /api/calc/capital-gains-tax-calculator`

## Request

- Base URL: `https://calcbright.com`
- URL: `https://calcbright.com/api/calc/capital-gains-tax-calculator`
- Auth: none declared

2026 US federal tax on a stock, crypto or property sale: long-term 0%, 15% or 20% versus short-term ordinary rates, plus the 3.8% NIIT where it applies.

## Query parameters

- `purchase` number: Purchase price (cost basis) Include buying commissions and improvements.
- `sale` number: Sale price After selling costs.
- `holding` 'long' | 'short': Holding period
- `filing` 'single' | 'married' | 'hoh' | 'mfs': Filing status
- `income` number: Other annual income Wages and other ordinary income for the year, before the standard deduction.

## Response `200`

Calculation result

- CalcOutput
  - `ok` boolean
  - `tool` string
  - `name` string
  - `url` string: Open this link to see the full calculation
  - `inputs` object
  - `summary` string: Plain-text answer
  - `details` string
  - `result` object
  - `errors` object

## Other responses

- `400`: Invalid input (see errors)

---

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