Estimate your federal and state capital gains tax on any asset sale. See short-term vs long-term rates side by side.
See how your tax changes based on how long you held the asset.
Enter your asset's purchase price, sale price, and any selling costs such as broker commissions. Select your asset type, choose short-term or long-term holding period (or enter both purchase and sale dates to let the calculator determine it automatically), and fill in your filing status, annual taxable income, and state tax rate. Click Calculate Capital Gains Tax to see your federal tax, state tax, NIIT if applicable, total tax, and net proceeds. The comparison card below the breakdown shows both short-term and long-term scenarios so you can quantify the tax savings of holding longer.
The most important factor in capital gains taxation is how long you held the asset. Short-term capital gains apply to assets held for one year or less and are taxed at your ordinary income tax rate — anywhere from 10% to 37% depending on your bracket. Long-term capital gains apply to assets held for more than one year and are taxed at preferential rates of 0%, 15%, or 20%. For most middle-income investors, this difference amounts to paying 15% instead of 22% or 24% — a meaningful savings on large gains.
Long-term capital gains rates for 2024 are structured around taxable income thresholds. Single filers pay 0% on gains up to $47,025, 15% from $47,026 to $518,900, and 20% above that. Married filing jointly filers pay 0% up to $94,050, 15% from $94,051 to $583,750, and 20% above that. Head of household filers pay 0% up to $63,000. These thresholds are applied by stacking your capital gain on top of your ordinary income — if your ordinary income already puts you in the 15% bracket, all of your gain falls in the 15% bracket too.
The Net Investment Income Tax (NIIT) adds an extra 3.8% on top of regular capital gains rates for higher-income taxpayers. It applies when your Modified Adjusted Gross Income exceeds $200,000 for single filers or $250,000 for married filing jointly. The NIIT applies to the lesser of your net investment income (including capital gains) or the amount your MAGI exceeds the threshold. So a single filer with $220,000 in MAGI and $30,000 in capital gains would pay the 3.8% NIIT on the lesser of $30,000 or $20,000 (the excess over $200,000) — resulting in NIIT of $760.
Several legal strategies can reduce the capital gains tax you owe. Hold longer: waiting until you pass the one-year mark converts a short-term gain into a long-term gain, often cutting your rate in half. Tax-loss harvesting: selling investments that have declined in value to offset gains in the same tax year reduces your net taxable gain. Contribute to tax-advantaged accounts: gains inside a traditional IRA or 401(k) are tax-deferred; gains inside a Roth account are tax-free. Time your sale: if your income is unusually low in a particular year, realizing gains that year may push them into the 0% long-term bracket.
Real estate and collectibles have unique capital gains rules. For primary residence sales, most homeowners can exclude up to $250,000 of gain ($500,000 for married filing jointly) if they owned and lived in the home for at least two of the five years before sale. For rental real estate, depreciation you previously claimed must be "recaptured" at a maximum federal rate of 25% — a calculation that requires knowing your accumulated depreciation. Collectibles — art, coins, antiques, wine — are taxed at a maximum long-term rate of 28%, higher than the 15%/20% rates that apply to stocks and real estate.
Tax-loss harvesting is the practice of selling investments that have declined in value to generate realized losses that offset your capital gains. Capital losses are first applied against capital gains of the same type (short-term losses against short-term gains, long-term losses against long-term gains), then excess losses of either type can offset gains of the other type. If your losses exceed your gains, you can deduct up to $3,000 of net capital losses against ordinary income per year, with remaining losses carried forward to future tax years. Be aware of the wash-sale rule: you cannot repurchase substantially identical securities within 30 days before or after the sale without losing the tax benefit.
More free tax and financial calculators.