Calculate federal, NIIT, and state capital gains tax for 2026.
Long-term capital gains rates (0%/15%/20%) are based on IRS inflation-adjusted brackets for 2026 (Rev. Proc. 2025-32). NIIT (3.8%) applies above $200K/$250K. State rates are simplified. This is for estimation only — consult a tax professional.
A capital gain is the difference between what you sell an asset for and what you paid for it (your cost basis). The key driver is holding period: sell within 365 days and the gain is short-term, taxed at your ordinary income rate (up to 37% in 2026); hold longer and it becomes long-term, taxed at the preferential 0%, 15%, or 20% rates. The long-term rate you pay depends on your total taxable income, including the gain itself. A 3.8% Net Investment Income Tax (NIIT) can also apply once your income passes $200,000 (single) or $250,000 (married).
Held more than 365 days, a gain qualifies for the long-term ladder: 0% up to $49,450 of taxable income, 15% to $545,500, and 20% above. Held shorter, it is taxed like wages at ordinary rates up to 37%.
Priya, a software engineer in Seattle, bought $20,000 of index-fund shares and sold them for $35,000 after 400 days. She has $80,000 of ordinary income and files single.
Short-term gains (held ≤1 year) are taxed as ordinary income; long-term gains (held >1 year) are taxed at 0%, 15%, or 20% depending on your income bracket. Enter your gain to see the exact tax.
FreeToolHub Capital Gains Tax Calculator is a free browser-based tool that calculates tax on stock and crypto gains, no signup, no upload.
Know your after-tax gain before you sell stocks or crypto. Short + long-term, 2026, free.
The Capital Gains Tax Calculator estimates the federal and state tax you owe when selling stocks, crypto, real estate, or other capital assets. It distinguishes between short-term gains (held 365 days or less, taxed at ordinary income rates) and long-term gains (held 366+ days, taxed at preferential 0%/15%/20% rates). The calculator also factors in the Net Investment Income Tax (NIIT) of 3.8% for high earners, and state capital gains tax for all 50 states.
This calculator is for investors, day traders, crypto holders, real estate sellers, and anyone selling assets for a profit. Whether you are selling stocks on Robinhood, crypto on Coinbase, or a rental property, you need to know your tax liability before tax season. If you sold assets held less than one year, you face short-term rates (10%-37%); if held longer than one year, you benefit from long-term rates (0%, 15%, or 20%).
Enter your purchase price, sale price, holding period (in days), filing status, ordinary income, and state. The calculator: (1) Determines if your gain is short-term or long-term based on the 365-day threshold. (2) For long-term gains, applies the 2026 LTCG brackets: 0% for income up to $47,025 (single) / $94,050 (married), 15% for income up to $518,900 / $583,750, 20% above. (3) Adds NIIT (3.8%) if your modified AGI exceeds $200,000 (single) / $250,000 (married). (4) Adds state capital gains tax (most states tax capital gains as ordinary income; 9 states have no income tax). (5) Shows effective rate and net proceeds after tax.
A single filer in California with $60,000 ordinary income sells stock for a $40,000 long-term gain: • Federal LTCG (15% bracket): $6,000 • NIIT (3.8% on $40K, since AGI $100K < $200K threshold): $0 • California state tax (~9.3%): ~$3,720 • Total tax: ~$9,720 (24.3% effective rate) • Net proceeds: $30,280 If held less than 365 days, the $40,000 would be taxed at ordinary rates (~22% fed + 9.3% CA = ~$12,520), costing $2,800 more in tax.
Short-term capital gains (assets held 365 days or less) are taxed at your ordinary income tax rate, which ranges from 10% to 37% in 2026. Long-term capital gains (assets held 366 days or more) are taxed at preferential rates: 0%, 15%, or 20%, depending on your income. For most taxpayers, the long-term rate is 15%.
For 2026, the LTCG brackets are: 0% for taxable income up to $47,025 (single) or $94,050 (married filing jointly); 15% for income up to $518,900 (single) or $583,750 (MFJ); 20% for income above those thresholds. These brackets are adjusted annually for inflation.
The NIIT is a 3.8% surtax on investment income (including capital gains, dividends, interest, and rental income) for taxpayers with modified AGI above $200,000 (single) or $250,000 (married filing jointly). It applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold.
Most states tax capital gains as ordinary income at their standard income tax rates. Nine states have no income tax: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, and Wyoming. California has the highest top rate (13.3%) on capital gains.
The IRS treats cryptocurrency as property. Selling crypto for a profit triggers capital gains tax, just like stocks. Short-term if held 365 days or less, long-term if held 366+ days. Using crypto to purchase goods or services also triggers a taxable event. Mining income is taxed as ordinary income.
Yes. You can use capital losses to offset capital gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 per year against ordinary income ($1,500 if married filing separately) and carry forward remaining losses to future years.
Strategies include: (1) Hold assets for 366+ days to qualify for long-term rates. (2) Harvest tax losses to offset gains. (3) Use a 1031 exchange for investment real estate. (4) Gift appreciated stock to charity. (5) Invest through tax-advantaged accounts (IRA, 401k) where gains are tax-deferred or tax-free.
Brokerages report your sales to the IRS via Form 1099-B. Crypto exchanges issue Form 1099-DA starting in 2026. Failing to report capital gains can result in IRS penalties, interest, and potential audit. The IRS matches 1099 forms to your tax return automatically.
This tool is also known by these tasks — each link opens the same tool with a focused guide:
What do you call a crab that plays baseball?
No paywalls, no signups, no data sold. Built by a solo developer who believes useful tools should be accessible to everyone.
☕Support me on Ko-fi— keep tools free100% of proceeds go towards hosting & building more free tools.