Capital Gains Tax Calculator
How much tax will you owe on your investment gains?
Calculate the capital gains tax you'll owe on investment profits from stocks, real estate, or other assets. This calculator determines your tax rate based on income level and holding period, then shows your net gain after taxes.
—
Send feedback
💡 Share your idea or report a problem
✓ Thanks! We'll take a look.
Learn more
How It Works
The formula, explained simply
Most investors focus on their gains but forget about Uncle Sam's cut. Capital gains tax works like a partnership where the government claims a percentage of your investment profits based on two key factors: how long you held the asset and your total income level.
The tax system creates a dramatic cliff at exactly 365 days. Sell Apple stock after 364 days of ownership, and your $10,000 profit gets taxed at rates up to 37%. Wait one more day, and that same profit faces a maximum 20% rate. This single day can save thousands in taxes on large gains.
Your regular income determines which tax bracket applies to your gains. A teacher earning $50,000 annually pays 0% on long-term gains, while a surgeon earning $500,000 pays 20% on identical profits. The government essentially charges more successful earners higher rates to share in their investment success.
When To Use This
Right tool, right situation
Use this calculator when deciding whether to sell appreciated assets before year-end or wait until after January 1st. The tax savings from crossing the one-year threshold often outweigh short-term market risks, especially for large positions in stable companies.
This tool helps during retirement planning when you're managing taxable account withdrawals. Retirees can often time asset sales during low-income years to take advantage of the 0% long-term capital gains rate, effectively harvesting gains tax-free.
Don't rely on this calculator for complex situations like installment sales, like-kind exchanges, or assets with depreciation recapture. These specialized transactions have different rules that override standard capital gains treatment.
Common Mistakes
Why results sometimes look wrong
The biggest mistake is selling winners too early to 'lock in profits' without considering the tax calendar. Day traders and momentum investors often generate massive short-term gains taxed at ordinary rates up to 37%, while buy-and-hold investors on identical stocks pay maximum 20% rates.
Another expensive error is forgetting about cost basis adjustments. Real estate investors miss deductions for improvements, mutual fund holders ignore reinvested dividends that increase their basis, and stock traders forget to account for splits and spin-offs. These oversights inflate your taxable gain artificially.
High earners frequently trigger the net investment income tax without realizing it. This additional 3.8% tax kicks in when investment income plus modified adjusted gross income exceeds $200,000 for singles or $250,000 for couples, making the effective capital gains rate 23.8% instead of 20% for top brackets.
The Math
Worked examples and deeper derivation
The calculation starts with your cost basis — what you actually paid including fees and improvements. Subtract this from your sale proceeds to find your gain. Then the tax system splits into two parallel tracks based on your holding period.
Short-term gains (under one year) get added directly to your ordinary income and taxed at the same rates as your salary. If you're in the 24% tax bracket, your short-term trading profits face that same 24% rate. Long-term gains (over one year) use completely separate rate tables: 0%, 15%, or 20% based on your total income.
The math gets interesting at the boundaries. Someone earning $44,625 pays 0% on long-term gains, but earning $44,626 triggers a 15% rate on all gains above zero. These cliff effects make income timing crucial for tax planning, especially in years with large asset sales.
Expert Unlock
The thing most explanations skip
Professional investors know that capital gains rates are just the starting point. The wash sale rule prevents you from claiming losses on securities if you buy substantially identical assets within 30 days. State taxes add another layer — California's 13.3% top rate makes federal long-term treatment less valuable for residents there.
How does holding period affect my capital gains tax?
Need something this doesn't cover?
Suggest a tool — we'll build it →