Your results will appear here.
Enter your values and press Calculate.
Enter your purchase price and sale price, your holding period, and your income band. The calculator subtracts to find the capital gain, then applies the 2025 US federal long-term rate for your band (0%, 15%, or 20%) if you held the asset for more than a year, or a flat 22% assumption for short-term sales. A sale at a loss produces zero estimated tax. This is a simplified federal estimate only: state taxes, the Net Investment Income Tax, and special asset rules are not included.
You calculate capital gains tax in two steps: first find the gain, then apply the rate. When you sell an investment for more than you paid, the profit is a capital gain: sale price minus what you paid (your cost basis), minus any selling costs such as broker fees. Only realized gains are taxed. If your stocks rise in value but you keep holding them, that is an unrealized gain and you owe nothing until you sell. Capital assets include stocks, ETFs, mutual funds, business assets, and real estate. A loss works the same way in reverse: sell for less than you paid and you have a capital loss, which produces no capital gains tax.
The single most important factor in your bill is how long you held the asset. Sell after one year or less and the gain is short-term, taxed as ordinary income at federal rates of 10% to 37%. Hold for more than one year and it becomes a long-term gain with preferential rates. For 2025, a single filer's long-term brackets are 0% on taxable income up to $48,350, 15% from $48,351 to $533,400, and 20% above $533,400 (married couples filing jointly get roughly double those thresholds). This calculator keeps things simple: it applies the long-term bracket you select for holdings over a year, and uses a flat 22% assumption for short-term sales, since the true short-term rate follows your full ordinary income bracket. Waiting a few weeks to avoid the higher short-term rate is often the easiest tax saving you will ever make.
Suppose you buy stock for $10,000 and sell it 18 months later for $16,000. Your capital gain is $16,000 minus $10,000, which is $6,000. With income in the middle bracket, the long-term rate is 15%, so the estimated federal tax is $6,000 × 15% = $900, leaving net proceeds of $16,000 minus $900 = $15,100. Now imagine you sold after only 10 months: the same $6,000 gain would be short-term, and at the flat 22% assumption the tax would be $1,320, leaving $14,680. This shows how much capital gains tax depends on timing: crossing the one-year line saves $420 on this one sale, about 32% less tax. The short-term vs long-term difference scales up fast on bigger gains.
Stocks, ETFs, mutual funds, business assets, and real estate are all capital assets. The IRS treats cryptocurrency (crypto) as property, so selling, trading, or spending crypto is a taxable event with the same short-term and long-term rules as stocks. Collectibles such as art, coins, and certain precious metals can face a 28% long-term maximum, higher than the standard 20%. Selling your primary residence can be partly or fully excluded under Section 121: up to $250,000 of gain if you file single, or $500,000 if married filing jointly, provided you owned and lived in the home as your primary residence for at least two of the last five years. Second homes and investment properties do not get this exclusion.
Four proven ways to lower the bill: (1) Hold for more than a year to unlock the 0%, 15%, or 20% long-term rates instead of ordinary income rates. (2) Harvest losses: sell underperforming investments so the losses offset your gains; net losses of up to $3,000 a year can also reduce ordinary income, with the rest carried forward. (3) Sell in a low-income year, such as a career break or early retirement, to slide into the 0% long-term bracket. (4) Trade inside tax-advantaged accounts: activity in a 401(k), traditional IRA, or Roth IRA generates no capital gains tax at sale time. Note these are estimates, not professional tax advice: tax law is complex, and a CPA can model your exact situation.
This tool gives a simplified US federal estimate based on the 2025 single-filer long-term brackets and a flat 22% short-term assumption. It does not include state capital gains taxes (most states tax gains as ordinary income at roughly 2% to 13%), the 3.8% Net Investment Income Tax on high earners, depreciation recapture on rental property, the wash-sale rule, or adjustments to your cost basis such as commissions and improvements. Actual filing requires IRS forms like Form 8949 and Schedule D. Use this calculator to plan the size of the bill, then confirm the details with a tax professional.
More than one year. The holding period starts the day after you buy, so selling on or before the one-year anniversary is usually short-term. If you are close to the line, waiting a few extra weeks can convert a gain taxed at up to 37% into one taxed at 0%, 15%, or 20%, a difference that can save thousands on a large sale.
Yes. Capital losses offset capital gains dollar for dollar, with short-term losses first canceling short-term gains and long-term losses canceling long-term gains. If losses exceed gains, up to $3,000 remains deductible against ordinary income in that tax year ($1,500 if married filing separately), and you carry the remaining loss forward to future years. This planned use of losses is called tax-loss harvesting.
Yes. The taxable event happens when you sell, not when you decide what to do with the cash, so simply choosing to reinvest does not erase the tax. The main exceptions are a Section 1031 like-kind exchange for investment real estate, which defers the gain, and investing in a Qualified Opportunity Zone fund, which can defer and partly reduce it.
This calculator estimates federal tax only. Most states also tax capital gains, usually as ordinary income at rates between roughly 2% and 13%, so residents of high-tax states can owe a lot more in total. A handful of states, including Texas, Florida, and Nevada, have no state income tax and therefore no state capital gains tax. Add your state's rate to the federal estimate for the full picture.
The IRS treats cryptocurrency as property. Every sale, trade, or purchase made with crypto is a taxable event: the difference between what you paid (your cost basis) and what it was worth when you disposed of it is a capital gain or loss. The same short-term and long-term holding rules apply as for stocks. Many investors are surprised that crypto-to-crypto swaps and buying goods with crypto both count.
Yes. Under Section 121, if you owned and lived in the home as your primary residence for at least two of the last five years, you can exclude up to $250,000 of gain if you file single, or $500,000 if married filing jointly. Only gain above the exclusion is taxed, at long-term rates. Second homes and investment properties do not get this exclusion.
In 2025, single filers with total taxable income up to $48,350 pay 0% on long-term gains ($96,700 for married filing jointly). That income figure includes your ordinary income plus the gain itself. If you are near the threshold, realizing gains in a low-income year, during a career transition or early retirement, can make part or all of the sale tax-free.
First compute the gain: sale price minus purchase price minus selling costs. Then classify it: held one year or less is short-term (taxed as ordinary income, 10% to 37%); held more than one year is long-term (0%, 15%, or 20% for 2025, based on your taxable income). Multiply the gain by the rate to get the tax, and subtract the tax from the sale price for your net proceeds. If the sale produced a loss, the capital gains tax is zero.