How stock and ETF capital gains are taxed
When you sell shares of stock, ETFs, or mutual funds for more than your adjusted cost basis, the profit is generally a capital gain. The IRS taxes that gain based primarily on how long you held the shares and your taxable income. Commissions and fees typically reduce proceeds or increase basis; reinvested dividends increase your basis if they were previously taxed.
Shares held more than one year usually qualify for long-term capital gains rates of 0%, 15%, or 20%. Shares held one year or less produce short-term gains taxed as ordinary income at rates up to 37%. Large gains can also trigger the 3.8% Net Investment Income Tax when MAGI exceeds the threshold for your filing status.
The wash-sale rule is critical for securities. If you sell at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the loss may be disallowed and added to the basis of the replacement shares. Mutual fund capital gain distributions reported on Form 1099-DIV are generally taxable even when reinvested — this calculator focuses on sale of shares rather than fund distributions.
State tax layers on top of federal tax. Zero-income-tax states show $0 state capital gains tax in our model, while graduated and flat-rate states apply their published frameworks. Use the calculator with your filing status and state selected, then cross-check our methodology and official IRS Topic 409 guidance before filing.
Also see
Other calculators, how we model the numbers, and IRS Topic 409.
