{
  "slug": "capital-gains",
  "title": "Capital Gains Tax Calculator",
  "heading": "Capital Gains Tax Calculator",
  "category": "financial",
  "url": "https://www.revenuelab.fyi/toolbox/capital-gains",
  "summary": "Tax owed on an investment sale, short-term or long-term.",
  "description": "Assets held over a year qualify for long-term capital gains rates of 0%, 15%, or 20% federally, which are far kinder than short-term rates that follow ordinary income. Holding period is often worth more than timing the market.",
  "formula": "Gain = Sale proceeds − Cost basis − Selling costs. Tax = Gain × applicable rate.",
  "dateModified": "2026-09-30",
  "run_url": "https://www.revenuelab.fyi/api/public/calc?tool=capital-gains",
  "inputs": [
    {
      "id": "sale",
      "label": "Sale price",
      "kind": "number",
      "hint": null,
      "default": 85000,
      "unit": "$",
      "min": 0,
      "max": null
    },
    {
      "id": "basis",
      "label": "Cost basis",
      "kind": "number",
      "hint": null,
      "default": 42000,
      "unit": "$",
      "min": 0,
      "max": null
    },
    {
      "id": "costs",
      "label": "Selling costs",
      "kind": "number",
      "hint": null,
      "default": 500,
      "unit": "$",
      "min": 0,
      "max": null
    },
    {
      "id": "term",
      "label": "Holding period",
      "kind": "select",
      "hint": null,
      "default": "long",
      "options": [
        {
          "value": "long",
          "label": "Long-term (over 1 year)"
        },
        {
          "value": "short",
          "label": "Short-term (1 year or less)"
        }
      ]
    },
    {
      "id": "ltRate",
      "label": "Long-term rate",
      "kind": "number",
      "hint": null,
      "default": 15,
      "unit": "%",
      "min": 0,
      "max": 30
    },
    {
      "id": "ordinary",
      "label": "Ordinary income rate",
      "kind": "number",
      "hint": null,
      "default": 24,
      "unit": "%",
      "min": 0,
      "max": 50
    },
    {
      "id": "stateRate",
      "label": "State tax rate",
      "kind": "number",
      "hint": null,
      "default": 0,
      "unit": "%",
      "min": 0,
      "max": 15
    }
  ],
  "outputs": [
    {
      "id": "totalTax",
      "label": "Total capital gains tax",
      "format": "currency",
      "hint": null,
      "primary": true
    },
    {
      "id": "gain",
      "label": "Taxable gain",
      "format": "currency",
      "hint": null,
      "primary": false
    },
    {
      "id": "federal",
      "label": "Federal tax",
      "format": "currency",
      "hint": null,
      "primary": false
    },
    {
      "id": "state",
      "label": "State tax",
      "format": "currency",
      "hint": null,
      "primary": false
    },
    {
      "id": "net",
      "label": "Net proceeds after tax",
      "format": "currency",
      "hint": null,
      "primary": false
    }
  ],
  "worked_example": {
    "inputs": [
      "Sale price: 85000 $",
      "Cost basis: 42000 $",
      "Selling costs: 500 $",
      "Holding period: Long-term (over 1 year)",
      "Long-term rate: 15 %",
      "Ordinary income rate: 24 %",
      "State tax rate: 0 %"
    ],
    "outputs": [
      "Total capital gains tax: $6,375.00",
      "Taxable gain: $42,500.00",
      "Federal tax: $6,375.00",
      "State tax: $0.00",
      "Net proceeds after tax: $78,125.00"
    ]
  },
  "how_to": {
    "title": "How to use this",
    "steps": [
      "Enter sale price ($).",
      "Enter cost basis ($).",
      "Enter selling costs ($).",
      "Enter holding period.",
      "Enter long-term rate (%).",
      "Enter ordinary income rate (%).",
      "Enter state tax rate (%).",
      "Read your total capital gains tax on the right — it updates as you type.",
      "Hit Share to keep the scenario or send it to someone."
    ]
  },
  "scenarios": [
    {
      "name": "Conservative",
      "description": "Lower-end numbers — what if things land soft?",
      "values": {
        "sale": 51000,
        "basis": 25000,
        "costs": 300,
        "term": "long",
        "ltRate": 9,
        "ordinary": 14,
        "stateRate": 0
      }
    },
    {
      "name": "Typical",
      "description": "Defaults — the most common real-world setup.",
      "values": {
        "sale": 85000,
        "basis": 42000,
        "costs": 500,
        "term": "long",
        "ltRate": 15,
        "ordinary": 24,
        "stateRate": 0
      }
    },
    {
      "name": "Ambitious",
      "description": "Higher-end numbers — what if things really pop?",
      "values": {
        "sale": 136000,
        "basis": 67000,
        "costs": 800,
        "term": "long",
        "ltRate": 24,
        "ordinary": 38,
        "stateRate": 0
      }
    }
  ],
  "limitations": [
    "Results are estimates before tax, fees, and inflation unless an input explicitly covers them.",
    "Rates are treated as fixed for the whole period — variable-rate products will drift from this projection.",
    "This is educational maths, not financial advice. Check anything contractual with the lender or your accountant."
  ],
  "faq": [
    {
      "q": "How does the capital gains tax calculator work?",
      "a": "Assets held over a year qualify for long-term capital gains rates of 0%, 15%, or 20% federally, which are far kinder than short-term rates that follow ordinary income. Holding period is often worth more than timing the market. The underlying maths is: Gain = Sale proceeds − Cost basis − Selling costs. Tax = Gain × applicable rate."
    },
    {
      "q": "What do I need to enter?",
      "a": "7 values: sale price, cost basis, selling costs, holding period, long-term rate, ordinary income rate, and state tax rate. Each field starts with a sensible default, so you can change one number at a time and watch the result move."
    },
    {
      "q": "What does the total capital gains tax result mean?",
      "a": "It is returned as a money amount in US dollars and updates live as you edit the inputs, so you can compare two or three versions of a scenario in a few seconds."
    },
    {
      "q": "Is this calculator free, and do I need an account?",
      "a": "Yes, it's free, and no account is required. Nothing you type is stored on our servers — the maths runs entirely in your browser."
    },
    {
      "q": "How accurate is the result?",
      "a": "It applies the standard formula exactly, so the arithmetic is precise. Results are estimates before tax, fees, and inflation unless an input explicitly covers them."
    },
    {
      "q": "Who is this tool for?",
      "a": "It's built for anyone comparing money scenarios before committing — budgeting a payment, sanity-checking a quote, or seeing what a change in rate or term actually costs."
    }
  ],
  "related": [
    "https://www.revenuelab.fyi/toolbox/income-tax",
    "https://www.revenuelab.fyi/toolbox/investment"
  ],
  "license": "CC-BY-4.0",
  "citation": "RevenueLab — Capital Gains Tax Calculator (https://www.revenuelab.fyi/toolbox/capital-gains)"
}