Capital Gains Tax Calculator

Capital Gains Tax is evaluated from Cost Basis, Sale Price and Holding Period. The calculation reports Capital Gain, Applicable Tax Rate and Estimated Tax Owed.

Results

Thanks — we’ve logged this for review.

About the Capital Gains Tax Calculator

Capital Gains Tax is treated here as a quantitative relation between Cost Basis, Sale Price, Holding Period and Filing Status and Capital Gain, Applicable Tax Rate, Estimated Tax Owed and Net Proceeds After Tax.

The calculator uses a custom php logic configuration. Each reported value is read as a direct evaluation of the stored rules with the declared field formats and units.

Formula basis:
Capital Gain = Sale Price - Cost Basis
For Short-Term: Tax Rate = Your ordinary income marginal rate
For Long-Term (Single 2024):
- If (income + gain) <= $47,025: Rate = 0%
- If income <= $47,025 but (income + gain) > $47,025: Rate = 0% on gain up to $47,025, 15% on remainder
- If income > $47,025 and <= $518,900: Rate = 15%
- If income > $518,900: Rate = 20% on gain above $518,900 threshold
Tax Owed = Capital Gain x Applicable Rate (simplified; actual calculation uses stacking)
Net Proceeds = Sale Price - Cost Basis - Tax Owed

Interpret the outputs in the order shown by the result fields. Optional inputs affect only the outputs that depend on those variables.

Formula & How It Works

The calculation applies the following relations exactly as recorded in the metadata:

Capital Gain = Sale Price - Cost Basis
For Short-Term: Tax Rate = Your ordinary income marginal rate
For Long-Term (Single 2024):
- If (income + gain) <= $47,025: Rate = 0%
- If income <= $47,025 but (income + gain) > $47,025: Rate = 0% on gain up to $47,025, 15% on remainder
- If income > $47,025 and <= $518,900: Rate = 15%
- If income > $518,900: Rate = 20% on gain above $518,900 threshold
Tax Owed = Capital Gain x Applicable Rate (simplified; actual calculation uses stacking)
Net Proceeds = Sale Price - Cost Basis - Tax Owed

Each output field is produced by substituting the supplied inputs into the relevant relation and then applying the declared rounding or text format.

Worked Examples

Example 1: Long-Term Stock Sale — 15% Rate

Inputs

cost_basis: 15000 sale_price: 42000 holding_period: long filing_status: single annual_income: 78000
Capital Gain: $27,000. Applicable Tax Rate: 15%. Estimated Tax Owed: $4,050. Net Proceeds After Tax: $37,950

With Cost Basis = 15,000, Sale Price = 42,000, Holding Period = long and Filing Status = single as the stated inputs, the result is Capital Gain = $27,000, Applicable Tax Rate = 15% and Estimated Tax Owed = $4,050. Each value corresponds to the declared output fields.

Example 2: Short-Term Stock Trade — Ordinary Rate

Inputs

cost_basis: 10000 sale_price: 18500 holding_period: short filing_status: single annual_income: 70000
Capital Gain: $8,500. Applicable Tax Rate: 15%. Estimated Tax Owed: $1,275. Net Proceeds After Tax: $17,225

With Cost Basis = 10,000, Sale Price = 18,500, Holding Period = short and Filing Status = single as the stated inputs, the result is Capital Gain = $8,500, Applicable Tax Rate = 15% and Estimated Tax Owed = $1,275. Each value corresponds to the declared output fields.

Example 3: 0% Rate — Lower Income

Inputs

cost_basis: 5000 sale_price: 18000 holding_period: long filing_status: single annual_income: 30000
Capital Gain: $13,000. Applicable Tax Rate: 15%. Estimated Tax Owed: $1,950. Net Proceeds After Tax: $16,050

With Cost Basis = 5,000, Sale Price = 18,000, Holding Period = long and Filing Status = single as the stated inputs, the result is Capital Gain = $13,000, Applicable Tax Rate = 15% and Estimated Tax Owed = $1,950. Each value corresponds to the declared output fields.

Example 4: Real Estate Sale — Primary Home

Inputs

cost_basis: 275000 sale_price: 620000 holding_period: long filing_status: mfj annual_income: 160000
Capital Gain: $345,000. Applicable Tax Rate: 15%. Estimated Tax Owed: $51,750. Net Proceeds After Tax: $568,250

With Cost Basis = 275,000, Sale Price = 620,000, Holding Period = long and Filing Status = mfj as the stated inputs, the result is Capital Gain = $345,000, Applicable Tax Rate = 15% and Estimated Tax Owed = $51,750. Each value corresponds to the declared output fields.

Common Use Cases

  • Calculate tax owed on selling a stock or ETF
  • Estimate capital gains tax on a real estate sale
  • Decide between selling short-term vs waiting for long-term rates