Understanding Capital Gains Taxes in the United States
When you sell an investment or asset for more than you paid for it, the resulting profit is subject to capital gains tax. Whether you are trading stocks, investing in cryptocurrency, selling real estate, or liquidating a business, understanding how these taxes are computed is essential for calculating your actual net profit.
This calculator is designed to provide a highly accurate estimate of your combined tax burden, including federal capital gains tax, state-level capital gains tax, and the federal Net Investment Income Tax (NIIT) surcharge for high earners.
Long-Term vs. Short-Term Gains: The One-Year Rule
The single most important factor determining your capital gains tax rate is the holding period:
- Short-Term Capital Gains (≤ 1 Year): If you sell an asset after holding it for one year or less, your profit is treated as ordinary income. It is stacked on top of your salary and taxed at your marginal federal ordinary income tax bracket (ranging from 10% to 37%).
- Long-Term Capital Gains (> 1 Year): If you hold your asset for even one day longer than a year, your profits qualify for lower progressive capital gains tax rates (0%, 15%, or 20%). The threshold for these brackets depends on your overall taxable income.
Calculating Your Net Taxable Gain (Cost Basis)
Your taxable capital gain is not simply the selling price. It is calculated as:
Taxable Gain = Selling Price - Purchase Price (Cost Basis) - Transaction Fees
Transaction fees include broker commissions, exchange transaction fees, escrow costs, and legal fees incurred during the purchase or sale. Reducing your taxable gains by including these fees ensures you only pay taxes on your actual, net realized profits.
Avoiding Surcharges: The 3.8% NIIT
The Net Investment Income Tax (NIIT) is a 3.8% tax created by the Affordable Care Act that targets investment income for high earners. It is triggered when your Modified Adjusted Gross Income (MAGI) exceeds $200,000 for single filers or $250,000 for married couples filing jointly. The tax applies to the lesser of your net investment income or the amount your MAGI exceeds the threshold. Our calculator automatically applies this formula to protect you from unexpected IRS surcharges.
