> >Stock Tax Calculator
Stock Tax Calculator
Calculate capital gains tax on stock sales based on purchase price, sale price, holding period, and your income level.
Purchase Price ($)
Sale Price ($)
Holding Period
Annual Income ($)
Stock Tax Calculation
Capital Gain: $5000.00
Type: Long-term
Tax Rate: 15.0%
Tax Owed: $750.00
Net After Tax: $4250.00
Related Calculators
External Resources
Frequently Asked Questions
- How are stocks taxed?
- Stocks are subject to capital gains tax when sold at a profit. Short-term gains (held under 1 year) are taxed at ordinary income rates (10-37%). Long-term gains (held over 1 year) are taxed at 0%, 15%, or 20%. Dividends are also taxable as qualified or ordinary dividends.
- What is the difference between short-term and long-term capital gains?
- Short-term capital gains apply to stocks held for one year or less and are taxed at ordinary income rates (10-37%). Long-term gains apply to stocks held for more than one year and are taxed at preferential rates of 0%, 15%, or 20% depending on income.
- How are stock dividends taxed?
- Qualified dividends from US corporations are taxed at long-term capital gains rates (0%, 15%, or 20%). Non-qualified (ordinary) dividends are taxed at your marginal income tax rate. Dividend taxes also apply to mutual funds and ETFs.
- What is the wash sale rule?
- The wash sale rule prevents claiming a loss on a stock if you buy a substantially identical stock within 30 days before or after the sale. The disallowed loss is added to the cost basis of the replacement shares, deferring the loss until you eventually sell those shares.
- How does tax-loss harvesting work for stocks?
- Tax-loss harvesting involves selling stocks at a loss to offset capital gains from other sales. If losses exceed gains, up to $3,000 can offset ordinary income annually, with excess carried forward. Be careful of wash sale rules that can disallow the loss.
- What is the cost basis of stock?
- Cost basis is the original purchase price of stock, including commissions and fees. When you sell, your gain or loss is the difference between sale proceeds and cost basis. Different cost basis methods (FIFO, Average Cost, Specific ID) affect tax calculation.
- How are stock options taxed?
- Stock options taxation depends on option type. Incentive Stock Options (ISOs) may qualify for preferential treatment. Non-qualified Stock Options (NSOs) are taxed as ordinary income at exercise. Employee Stock Purchase Plans (ESPPs) have specific tax rules.
- How is stock from an IPO taxed?
- IPO stock is taxed like any other stock. Your cost basis is the IPO price. When you sell, gains are short-term or long-term depending on holding period. Lockup periods and insider trading rules may affect when you can sell.
- What is the Net Investment Income Tax (NIIT)?
- The NIIT is an additional 3.8% tax on the lesser of net investment income (including stock gains and dividends) or MAGI exceeding $200,000 (single) or $250,000 (married). This applies on top of regular capital gains taxes.
- How are stock sales reported to the IRS?
- Brokers report stock sales to the IRS on Form 1099-B. This form shows proceeds, cost basis, and whether gains are short-term or long-term. You report stock gains and losses on Schedule D and Form 8949.
- What is the holding period for long-term capital gains?
- The holding period for long-term capital gains is more than one year. The clock starts the day after you buy the stock and stops on the day you sell. If you hold for exactly one year or less, gains are short-term.
- How are stock losses deducted?
- Capital losses from stock sales first offset capital gains. If losses exceed gains, you can deduct up to $3,000 ($1,500 married filing separately) against ordinary income each year. Remaining losses carry forward indefinitely to future tax years.
- What is the capital gains tax rate for 2024?
- For 2024, long-term capital gains rates are 0% for taxable income up to $47,025 (single), 15% for $47,026-$518,900, and 20% for over $518,900. Short-term gains are taxed at ordinary income rates (10-37%). NIIT of 3.8% may also apply.
- How are inherited stocks taxed?
- Inherited stocks receive a step-up in basis to the fair market value on the date of death. If you sell immediately, you owe no capital gains tax. If the stock appreciates after inheritance, gains are long-term regardless of holding period.
- How are gifted stocks taxed?
- When you gift stock, the recipient assumes your cost basis. If the stock has appreciated, the recipient pays capital gains tax when selling. Gifts up to $18,000 (2024) per person per year are exempt from gift tax reporting.
- What is the difference between qualified and non-qualified dividends?
- Qualified dividends are paid by US corporations and meet holding period requirements. They are taxed at capital gains rates. Non-qualified (ordinary) dividends do not meet requirements and are taxed at ordinary income rates.
- How are margin interest and investment expenses handled?
- Margin interest used to purchase taxable investments is deductible as investment interest expense, limited to net investment income. Other investment expenses (advisory fees) are no longer deductible for most taxpayers after the Tax Cuts and Jobs Act.
- What is the Section 1202 exclusion for small business stock?
- Section 1202 allows exclusion of up to 100% of capital gains (up to $10 million or 10x basis) on qualified small business stock (QSBS) held for more than 5 years. This can result in significant tax savings for qualifying stock.
- How are stock buybacks taxed?
- Stock buybacks have been subject to a 1% excise tax on the fair market value of repurchased stock since 2023. For shareholders, selling stock in a buyback is taxed as a capital gain or loss, same as any other stock sale.
- What is the difference between common stock and preferred stock taxation?
- Both common and preferred stock are subject to the same capital gains and dividend tax rules. Preferred stock dividends are typically fixed and may be treated as qualified dividends if requirements are met. Gains on sale are treated identically.
- How are foreign stocks taxed?
- Foreign stocks are taxed similarly to US stocks. US taxpayers must report foreign stock holdings if total foreign assets exceed certain thresholds (FBAR, Form 8938). Foreign taxes paid on dividends may qualify for the Foreign Tax Credit.
- What is the tax treatment of stock splits?
- Stock splits do not trigger a taxable event. Your cost basis per share is adjusted: for a 2-for-1 split, your cost basis per share is halved. Total basis remains the same. Stock dividends (stock issued instead of cash) are generally not taxable.
- How are DRIP stock dividends taxed?
- Dividend Reinvestment Plan (DRIP) dividends are taxable in the year received, even though they are reinvested in additional shares. Your cost basis for the new shares is the amount of reinvested dividends. Track each reinvestment for accurate basis.
- What is the tax on stock trading as a business?
- If stock trading constitutes a business (trader tax status), you may deduct business expenses and use mark-to-market accounting (Section 475). Requirements include substantial, frequent, and continuous trading. Most individual investors cannot claim this status.
- How are ETF taxes different from stock taxes?
- ETFs are generally taxed similarly to stocks. Capital gains apply when you sell ETF shares. However, ETFs may distribute capital gains to shareholders. Index ETFs are more tax-efficient than actively managed funds due to lower turnover.
- What is the tax impact of stock donations to charity?
- Donating appreciated stock held for more than one year to a qualified charity allows you to deduct the fair market value up to 30% of AGI and avoid capital gains tax. This is more tax-efficient than selling the stock and donating the cash.
- How are equity compensation (RSUs) taxed?
- Restricted Stock Units (RSUs) are taxed as ordinary income at vesting based on the fair market value of the shares. The employer withholds taxes. Subsequent appreciation is taxed as capital gains when shares are sold. Form W-2 shows the vesting income.
- What is the tax rate on stock trading in retirement accounts?
- In traditional IRAs and 401(k)s, stock trading is tax-deferred. No capital gains tax applies until withdrawal, when distributions are taxed as ordinary income. In Roth accounts, qualified distributions are tax-free.
- How do I minimize taxes on stock gains?
- Strategies include: hold stocks for over one year for lower long-term rates, harvest losses to offset gains, donate appreciated stock to charity, use tax-advantaged accounts, consider tax-loss harvesting, and time sales to lower-income years.
- What records should I keep for stock taxes?
- Keep confirmation statements for all purchases and sales, dividend reinvestment records, stock split adjustments, cost basis documentation, and Forms 1099-B and 1099-DIV. Retain records for at least 7 years after filing.