Capital Gains Tax Calculator
Calculate capital gains tax on investments. Compare short-term vs long-term rates, NIIT, and state taxes. Free capital gains tax calculator with bracket stacking.
Capital Gains Tax: What Investors and Freelancers Need to Know
When you sell an investment for more than you paid, the profit is a capital gain — and the IRS wants its share. How much you owe depends on two factors: how long you held the investment and your total taxable income. Short-term gains (investments held less than one year) are taxed at your ordinary income rate, which can be as high as 37 percent. Long-term gains (held one year or longer) qualify for preferential rates of 0, 15, or 20 percent.
For freelancers and self-employed workers who invest side income, understanding capital gains taxes is critical for timing asset sales and managing tax liability. Selling an appreciated stock in a high-income year versus a low-income year can mean a difference of thousands of dollars in tax. This calculator models the exact tax impact of your gain based on your income level, holding period, and filing status.
How Bracket Stacking Works
Long-term capital gains are not taxed in isolation — they stack on top of your ordinary income. If your ordinary taxable income already fills the 0 percent capital gains bracket, your gains start in the 15 percent bracket. This means two investors with identical gains can pay very different tax rates depending on their other income. The calculator handles this stacking automatically, applying gains to the correct bracket based on your total income picture.
Using $75K ordinary income, 5% state tax, no losses
Investment Details
Total profit from selling investments
How long you held the investment before selling
Your tax filing status
Tax Settings
Your Capital Gains Tax
Capital Gains Tax
$10,000
On $50,000 net gain
Effective Rate
20.0%
15.0% federal rate
Long-Term Savings
$3,698
Saved vs short-term rates
Short-Term vs Long-Term Comparison
Detailed Tax Breakdown
How to Use the Capital Gains Tax Calculator
Enter your capital gain amount, select your holding period and filing status, and see your estimated tax instantly. The calculator handles the complex bracket stacking that determines your actual rate.
Quick Mode
Enter your gain amount, holding period, and filing status. The calculator assumes $75,000 ordinary income, 5% state tax rate, and no capital losses.
Advanced Mode
Customize your ordinary income (which affects bracket stacking), capital losses to offset gains, and your state tax rate. See how NIIT applies if your income exceeds the threshold.
Understanding Capital Gains Brackets
Long-term capital gains have their own bracket structure (0%, 15%, 20%), but your gains "stack" on top of ordinary income. If your ordinary taxable income already fills the 0% bracket, your gains start in the 15% bracket. This is why two people with the same gain but different incomes pay different capital gains tax rates.
Key Concepts
Hold investments for at least one year to qualify for long-term rates. Use tax-loss harvesting to offset gains. Be aware of NIIT if your income is above the threshold. Capital losses exceeding gains can offset up to $3,000 of ordinary income per year, with the remainder carrying forward.
Embed This Calculator
Copy the code below to embed this calculator on your website.
<iframesrc="https://calcfalcon.com/embed/personal-finance/capital-gains-tax-calculator"width="100%"height="500"frameborder="0"title="Capital Gains Tax Calculator"></iframe>
Frequently Asked Questions
What is the difference between short-term and long-term capital gains?
Short-term capital gains apply to investments held less than one year and are taxed at your ordinary income tax rate (up to 37%). Long-term capital gains apply to investments held one year or longer and are taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income and filing status.
What is the Net Investment Income Tax (NIIT)?
The NIIT is an additional 3.8% tax on investment income (including capital gains) for high earners. It applies when your modified adjusted gross income exceeds $200,000 for single filers, $250,000 for married filing jointly, or $125,000 for married filing separately. The tax applies to the lesser of your net investment income or the amount your MAGI exceeds the threshold.
How does tax-loss harvesting work?
Tax-loss harvesting involves selling investments at a loss to offset capital gains. Losses first offset gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 per year ($1,500 if married filing separately) against ordinary income. Remaining losses carry forward to future tax years indefinitely.
How do capital gains brackets "stack" on ordinary income?
Long-term capital gains are taxed after your ordinary income fills up the lower brackets. For example, if you're single with $47,025 in taxable ordinary income, that fills the 0% capital gains bracket entirely. Your capital gains would then start in the 15% bracket. This is why higher ordinary income pushes your gains into higher capital gains tax brackets.
2024 Capital Gains Tax Brackets
Long-term capital gains rates depend on your total taxable income (ordinary income plus gains). Short-term gains are taxed at your ordinary income rate.
| Tax Rate | Single Filer | Married Filing Jointly |
|---|---|---|
| 0% | Up to $47,025 | Up to $94,050 |
| 15% | $47,026 - $518,900 | $94,051 - $583,750 |
| 20% | Over $518,900 | Over $583,750 |
| +3.8% NIIT | MAGI over $200,000 | MAGI over $250,000 |
Tax-Saving Strategies for Capital Gains
Hold for at least one year. The difference between short-term and long-term rates can be massive. A freelancer in the 32 percent bracket who sells a stock at a $50,000 gain after 11 months pays $16,000 in federal tax. Waiting one more month drops the rate to 15 percent, saving $8,500.
Tax-loss harvesting. Sell investments at a loss to offset gains dollar for dollar. If you have $30,000 in gains and $10,000 in losses, you only pay tax on $20,000. Losses exceeding gains can offset up to $3,000 of ordinary income per year, with unused losses carrying forward indefinitely. This is especially useful in volatile markets where some positions may be underwater.
Time sales in low-income years. Freelancers with variable income can strategically sell appreciated assets during low-income years when their ordinary income leaves room in the 0 percent capital gains bracket. A single filer with $40,000 in ordinary taxable income can realize up to $7,025 in long-term gains at a 0 percent federal rate.
Use tax-advantaged accounts. Gains inside a 401(k), IRA, or Roth IRA are not subject to capital gains tax. Roth accounts are especially powerful because qualified withdrawals, including all gains, are completely tax-free. Holding your highest-growth investments in tax-advantaged accounts maximizes this benefit.
Capital Gains for Freelancers and Business Owners
Self-employed workers often have both business income and investment income. Your self-employment earnings raise your ordinary income level, which pushes capital gains into higher brackets and can trigger the 3.8 percent NIIT. Planning the timing of asset sales around your expected business income for the year can meaningfully reduce your total tax bill. Work with a tax professional to model different scenarios before making large asset sales.
Get Free Tax Tips
Join thousands of freelancers getting actionable tax and finance tips delivered to their inbox.
Plus, download our free Freelancer Tax Cheatsheet (PDF)
Related Calculators
Self-Employment Tax Calculator
Calculate SE tax on freelance and business income
Personal FinanceFIRE Calculator
Plan your path to financial independence
FreelanceW2 vs 1099 Calculator
Compare take-home pay between employment types
FreelanceQuarterly Tax Estimator
Estimate your quarterly estimated tax payments