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
About the Capital Gains Tax Calculator
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
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
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
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
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