Advertisement
Quick Tip

Compound Interest Tips

Rule of 72: Divide 72 by your annual return rate to estimate how long it takes to double your money. Regular contributions and dividend reinvestment accelerate growth significantly.

Capital Gains Tax on Stocks: The Complete 2026 Guide to Investment Taxes, Rates, and Strategies

Last updated: March 5, 2026

Capital Gains Tax on Stocks: What Every Investor Needs to Know in 2026

Every dollar you earn in the stock market is split between two destinations: your pocket and the government's. A portfolio returning 10% annually does not deliver 10% to the investor—it delivers 10% minus taxes. For a high earner in a state like California or New York, that "minus" can consume a third or more of every realized gain. Understanding capital gains tax is not merely a compliance exercise; it is the foundation of every sound investment strategy, because after-tax returns are the only returns you actually keep.[1]

A capital gain occurs when you sell a stock (or other capital asset) for more than you paid. The gain is "unrealized" while you still hold the stock and "realized" once you sell. Only realized gains trigger a tax liability. The tax rate depends on two primary factors: how long you held the asset (the holding period) and your taxable income level. Long-term capital gains—on assets held for more than one year—enjoy preferential tax rates of 0%, 15%, or 20%. Short-term gains—on assets held for one year or less—are taxed at ordinary income rates, which reach as high as 37% in 2026. High earners face an additional 3.8% Net Investment Income Tax (NIIT), pushing the effective maximum to 23.8% on long-term gains and 40.8% on short-term gains at the federal level.[1, 7]

The 2026 tax landscape is more stable than it has been in years. The One Big Beautiful Bill Act (OBBBA), signed into law on July 4, 2025, permanently extended the Tax Cuts and Jobs Act's individual tax rate structure, eliminating the uncertainty of a 2026 sunset that had loomed over investors for nearly a decade. The IRS Revenue Procedure 2025-32 published the inflation-adjusted brackets for tax year 2026, providing precise thresholds for planning. This guide covers the full capital gains tax landscape: holding periods, 2026 brackets for all filing statuses, the NIIT surcharge, cost basis methods, state taxes, reporting requirements, eight proven strategies to reduce your tax bill, and stepped-up basis at death. If you have already read our tax-loss harvesting guide, this article provides the broader context—tax-loss harvesting is one powerful strategy; this guide covers the entire battlefield.[14, 6]

Advertisement
Quick Tip

Compound Interest Tips

Rule of 72: Divide 72 by your annual return rate to estimate how long it takes to double your money. Regular contributions and dividend reinvestment accelerate growth significantly.

Short-Term vs. Long-Term Capital Gains: The Holding Period That Changes Everything

The single most impactful decision affecting how much tax you owe on a stock sale is not which stock you sell—it is when you sell it. The IRS (Publication 544) classifies capital gains into two categories based on holding period. If you hold a stock for more than one year (at least one year and one day), the gain qualifies as a long-term capital gain and is taxed at the preferential rates of 0%, 15%, or 20%. If you hold it for one year or less, the gain is classified as a short-term capital gain and is taxed at your ordinary income tax rate—which ranges from 10% to 37% in 2026.[3]

The difference in dollar terms can be dramatic. Consider a single filer with $200,000 in taxable income (placing them in the 32% ordinary income bracket) who realizes a $50,000 stock gain. If sold as a short-term gain, the federal tax bill is approximately $16,000 (32%). If sold as a long-term gain, the rate drops to 15%, producing a tax bill of roughly $7,500—a savings of $8,500 on a single transaction. Add the 3.8% NIIT (which applies at this income level), and the comparison becomes $17,900 vs. $9,400. Simply waiting an extra day past the one-year mark saved $8,500. Over an investing career spanning dozens of such transactions, the cumulative savings can reach six figures.[1, 6]

Several date-counting rules are essential to get right. The holding period begins the day after acquisition—if you bought stock on March 1, your holding period starts March 2. You must hold through March 2 of the following year for the gain to qualify as long-term. For tax purposes, the IRS uses the trade date (the day you place the order), not the settlement date (when the transaction clears). For gifted stock, you generally inherit the donor's holding period and cost basis—if your parent held shares for five years before gifting them, you receive credit for those five years. For inherited stock, the rules are different: inherited assets are always treated as long-term, regardless of how long the decedent held them, and they receive a stepped-up basis to fair market value at the date of death (discussed in detail in Section 9).[2, 4]

FINRA advises investors to keep detailed records of acquisition dates, especially for stock received through employee stock purchase plans, stock options, stock splits, and corporate mergers or spin-offs, where the holding period calculation can become complicated. Getting the holding period wrong can result in paying short-term rates when you were entitled to long-term rates—or, worse, failing to report correctly and triggering an IRS inquiry.[15]

2026 Capital Gains Tax Rates and Brackets: OBBBA Made Them Permanent

The IRS Revenue Procedure 2025-32, published in October 2025 and updated to reflect OBBBA amendments, establishes the inflation-adjusted capital gains thresholds for tax year 2026. The three-tier structure—0%, 15%, and 20%—remains unchanged, but the income thresholds at which each rate begins have shifted upward to account for inflation. The 0% bracket for married filing jointly rose from $96,700 in 2025 to $98,900 in 2026, and the 20% threshold rose from $600,050 to $613,700, allowing more income to be taxed at lower rates.[6]

2026 Long-Term Capital Gains Tax Brackets: For single filers: 0% on taxable income up to $49,450; 15% from $49,451 to $545,500; 20% above $545,500. For married filing jointly: 0% up to $98,900; 15% from $98,901 to $613,700; 20% above $613,700. For head of household: 0% up to $66,200; 15% from $66,201 to $579,600; 20% above $579,600. For married filing separately: 0% up to $49,450; 15% from $49,451 to $306,850; 20% above $306,850. These thresholds are based on your taxable income (after deductions), not gross income. A single filer earning $65,000 in gross income with a $16,100 standard deduction has taxable income of $48,900—below the 0% threshold, meaning they would owe zero federal tax on long-term capital gains.[19, 23]

For comparison, short-term capital gains are taxed at ordinary income rates. The 2026 ordinary income brackets (per IRS Rev. Proc. 2025-32) for single filers are: 10% on income up to $12,400; 12% from $12,401 to $50,400; 22% from $50,401 to $105,700; 24% from $105,701 to $201,775; 32% from $201,776 to $256,225; 35% from $256,226 to $640,600; and 37% above $640,600. For married filing jointly: 10% up to $24,800; 12% from $24,801 to $100,800; 22% from $100,801 to $211,400; 24% from $211,401 to $403,550; 32% from $403,551 to $512,450; 35% from $512,451 to $768,700; and 37% above $768,700.[6, 16]

A critical nuance: capital gains brackets operate independently of ordinary income brackets. You can be in the 24% ordinary income bracket but the 15% capital gains bracket. Capital gains are stacked on top of ordinary income for purposes of determining which capital gains bracket applies—meaning your regular income fills the lower brackets first, and then your capital gains are taxed at whatever rate corresponds to the remaining bracket space. The OBBBA permanently extended this entire structure, so unlike the years of uncertainty about whether TCJA rates would expire in 2026, investors can now plan with confidence that these rates are the baseline going forward.[20, 22]

The 3.8% Net Investment Income Tax (NIIT): The Hidden Surcharge on Investment Gains

Beyond the standard capital gains rates, high earners face an additional 3.8% surcharge known as the Net Investment Income Tax (NIIT), enacted as part of the Affordable Care Act in 2013. The NIIT applies when your modified adjusted gross income (MAGI) exceeds $200,000 for single filers or $250,000 for married filing jointly. The tax is calculated as 3.8% of the lesser of your net investment income or the amount by which your MAGI exceeds the threshold.[7]

One of the most overlooked aspects of the NIIT is that its thresholds are not indexed for inflation. The $200,000 and $250,000 thresholds have not changed since 2013, and there is no provision in the OBBBA or any other current legislation to adjust them. As wages and investment returns grow with inflation, an increasing number of taxpayers cross these thresholds each year—a phenomenon known as "bracket creep." A household earning $250,000 in 2013 was solidly in the top 5% of earners; by 2026, the same nominal income is closer to the top 10%. The IRS NIIT FAQ confirms that these thresholds remain fixed at the 2013 levels.[8]

What counts as net investment income: capital gains (both short-term and long-term), dividends, interest, rental income, royalties, passive business income, and annuities. What does NOT count: wages, self-employment income, Social Security benefits, tax-exempt municipal bond interest, Veterans Administration benefits, and distributions from qualified retirement plans (IRAs, 401(k)s). This distinction creates planning opportunities—for example, converting a traditional IRA to a Roth IRA triggers ordinary income tax but does not generate net investment income subject to NIIT, because retirement plan distributions are excluded.[7, 8]

The practical effect of the NIIT is that the true maximum federal rates on investment gains in 2026 are: 23.8% on long-term capital gains (20% + 3.8% NIIT) and 40.8% on short-term capital gains (37% + 3.8% NIIT). For qualified dividends, the maximum is also 23.8%. These rates apply only to the highest earners—single filers with taxable income above $545,500 AND MAGI above $200,000. For investors in the 15% capital gains bracket with income below the NIIT threshold, the effective rate remains 15% with no surcharge.[7, 6]

Advertisement
Quick Tip

Compound Interest Tips

Rule of 72: Divide 72 by your annual return rate to estimate how long it takes to double your money. Regular contributions and dividend reinvestment accelerate growth significantly.

Cost Basis Methods: FIFO, LIFO, HIFO, and Specific Identification Explained

Your cost basis is the amount you paid for a stock, including commissions and fees. When you sell, the capital gain (or loss) equals the sale proceeds minus your cost basis. This sounds simple for a single purchase, but most investors buy the same stock at different times and prices, creating multiple "tax lots." The method you use to determine which lots you are selling directly affects how much tax you owe. IRS Publication 551 establishes the foundational rules for calculating basis, and IRS Topic 703 provides additional guidance.[4, 5]

FIFO (First In, First Out) is the default method if you do not specify otherwise. Under FIFO, the shares you purchased first are treated as the shares you sell first. Because older shares often have a lower cost basis (purchased at lower prices), FIFO tends to produce the largest taxable gains—and the highest tax bills. However, older shares are also more likely to qualify as long-term, which may partially offset this disadvantage. LIFO (Last In, First Out) sells the most recently purchased shares first. In a rising market, these shares have a higher basis, producing smaller gains. LIFO can be useful when you want to minimize the gain on a specific sale, but the shares sold may be short-term if recently acquired.[2]

HIFO (Highest In, First Out) sells the shares with the highest cost basis first, producing the smallest possible gain (or largest loss) on any given sale. HIFO is generally the most tax-efficient method for minimizing current-year taxes. Specific Identification (SpecID) gives you the ultimate flexibility: you choose exactly which tax lots to sell. This allows you to optimize for a combination of factors—minimizing gains, maximizing losses, managing holding periods, or keeping your gains within the 0% bracket. The IRS requires that you identify the specific lots at the time of sale (or instruct your broker to do so); you cannot retroactively choose the most favorable lots after the fact.[2]

Average Cost is available only for mutual fund shares and certain dividend reinvestment plans—not for individual stocks or ETFs. Under this method, the basis of all shares in a fund is averaged together. While simple, it does not allow the granular tax optimization that SpecID or HIFO provide. For investors who reinvest dividends through a DRIP (dividend reinvestment plan), each reinvestment creates a new tax lot with its own basis and holding period. Over years of quarterly reinvestment, a single stock position can accumulate dozens of lots. Without careful tracking, you may overpay taxes by defaulting to FIFO when SpecID or HIFO would have been more favorable.[2, 4]

Here is a concrete example. Suppose you bought 100 shares of XYZ at $50 (Lot A), another 100 at $75 (Lot B), and a third 100 at $100 (Lot C). The current price is $120, and you want to sell 100 shares. Under FIFO, you sell Lot A: gain = ($120 - $50) × 100 = $7,000. Under LIFO, you sell Lot C: gain = ($120 - $100) × 100 = $2,000. Under HIFO, you also sell Lot C (the highest basis), same $2,000 gain. Under SpecID, you could choose Lot B if you wanted a $4,500 gain while ensuring the shares are long-term. At a 15% long-term rate, the tax on these scenarios ranges from $300 (LIFO/HIFO) to $1,050 (FIFO)—a 3.5× difference from the same economic transaction. Most brokerages allow you to set your default cost basis method in your account settings.[2, 15]

State Capital Gains Taxes: How Your State Adds to the Tax Bill

Federal capital gains tax is only part of the picture. Most states also tax capital gains, and unlike the federal system, the vast majority of states do not offer preferential rates for long-term gains—they tax capital gains at the same rate as ordinary income. According to the Tax Foundation's state tax data, the highest-taxing states for capital gains include California (top marginal rate 13.3%), New York (10.9%, plus New York City surcharge of up to 3.876%), New Jersey (10.75%), Oregon (9.9%), and Minnesota (9.85%). These state taxes are added on top of federal taxes, creating combined rates that can significantly erode investment returns.[18]

Nine states impose no state income tax at all: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Wyoming, and New Hampshire (which taxes only interest and dividend income, not capital gains). Washington state is a special case—it has no traditional income tax but enacted a 7% capital gains excise tax on long-term gains exceeding a standard deduction of approximately $278,000 per individual (for 2025; the 2026 threshold will be adjusted for inflation). In 2025, Washington added a second tier: gains exceeding $1,000,000 are taxed at 9.9%. The Washington Supreme Court upheld this tax, classifying it as an excise tax rather than an income tax, which would have been unconstitutional under the state constitution.[18]

The combined effect of federal, state, and NIIT taxes can be striking. Consider a New York City resident in the top bracket who realizes a long-term capital gain: 20% federal + 3.8% NIIT + 10.9% New York state + 3.876% NYC surcharge = 38.576% combined rate. For short-term gains, the same resident faces: 37% federal + 3.8% NIIT + 10.9% state + 3.876% NYC = 55.576%—meaning the government takes more than half. Even in a moderate-tax state like Colorado (4.4%), the combined long-term rate reaches 28.2% for top earners. Understanding your state's treatment of capital gains is essential for accurate tax planning and for evaluating whether strategies like tax-loss harvesting or charitable giving of appreciated stock are worth implementing.[16, 27]

How to Calculate and Report Capital Gains: Form 8949, Schedule D, and 1099-B

Calculating your capital gain on a stock sale follows a straightforward formula: Proceeds − Cost Basis = Capital Gain (or Loss). The proceeds are the total amount you received from the sale (after brokerage commissions, if any). The cost basis is the original purchase price plus any adjustments—commissions paid at purchase, reinvested dividends (each of which creates a new lot), stock split adjustments, and return-of-capital distributions that reduced your basis. IRS Publication 550 provides comprehensive guidance on calculating basis for various scenarios including corporate reorganizations, spin-offs, and DRIP reinvestment.[2]

Once you have your gains and losses for the year, you apply the netting process. Step 1: Net short-term gains against short-term losses to get a net short-term figure. Step 2: Net long-term gains against long-term losses to get a net long-term figure. Step 3: If one is a net gain and the other is a net loss, net them against each other. The character of the final result (short-term or long-term) follows whichever side is larger. Step 4: If you have a net capital loss, up to $3,000 per year ($1,500 if married filing separately) can be deducted against ordinary income—wages, salary, interest. Step 5: Any remaining net loss carries forward to future tax years indefinitely, retaining its character (short-term or long-term).[1, 10]

The reporting chain works as follows. Your brokerage sends you Form 1099-B in early February, listing every sale during the prior tax year with proceeds, cost basis (for "covered" securities acquired after 2011), acquisition date, and holding period. You then transfer this information to Form 8949: Part I for short-term transactions and Part II for long-term. Each sale gets its own row. If the basis reported on your 1099-B differs from your actual basis (common with DRIP shares, wash sale adjustments, or noncovered securities), you enter an adjustment code and the correction amount. The totals from Form 8949 then flow to Schedule D (Form 1040), which calculates your overall net gain or loss and determines the tax.[9, 10]

Common pitfalls to avoid: (1) Missing cost basis on pre-2011 stocks: Brokerages were not required to report cost basis for stocks acquired before January 1, 2011. If your 1099-B shows "noncovered" or blank basis, you must reconstruct it from your own records or face being taxed on the entire proceeds as gain. (2) Wash sale misreporting: If you sold a stock at a loss and repurchased a "substantially identical" security within 30 days before or after, the loss is disallowed and added to the basis of the replacement shares. Brokerages may or may not correctly adjust for wash sales across different accounts. (3) Cryptocurrency omission: Beginning in tax year 2025, centralized exchanges must issue 1099-B for crypto transactions. Failure to report crypto gains is one of the most common audit triggers. (4) DRIP basis errors: Each dividend reinvestment creates a new lot. Using FIFO by default on heavily DRIPed positions often overstates the gain compared to HIFO or SpecID.[2, 9]

Advertisement
Quick Tip

Compound Interest Tips

Rule of 72: Divide 72 by your annual return rate to estimate how long it takes to double your money. Regular contributions and dividend reinvestment accelerate growth significantly.

8 Proven Strategies to Minimize Capital Gains Tax on Stocks

Strategy 1: Hold for More Than One Year. This is the single most impactful and accessible strategy for every investor. By waiting at least one year and one day before selling, your gains qualify for the long-term rate (0%, 15%, or 20%) instead of the short-term rate (10% to 37%). For a taxpayer in the 32% ordinary income bracket, converting a short-term gain to a long-term gain saves 17 percentage points on every dollar of gain. On a $100,000 profit, that is $17,000 in saved taxes—money that continues to compound if reinvested. Before selling any winning position, always check whether waiting a few more weeks or months would cross the one-year threshold.[1, 3]

Strategy 2: Tax-Efficient Asset Location. Where you hold your investments matters as much as what you hold. Place high-turnover, high-dividend, or bond-heavy investments in tax-advantaged accounts (traditional IRA, Roth IRA, 401(k)), where gains, dividends, and interest compound tax-free or tax-deferred. Place tax-efficient investments—like broad-market index funds and growth stocks that generate minimal distributions—in taxable brokerage accounts. Vanguard's research on tax-efficient investing demonstrates that asset location can add meaningful after-tax alpha without changing your overall portfolio allocation or risk level.[21]

Strategy 3: Tax-Gain Harvesting in the 0% Bracket. If your taxable income is low enough to fall within the 0% long-term capital gains bracket (up to $49,450 for single filers or $98,900 for married filing jointly in 2026), you can sell appreciated long-term holdings, pay zero federal tax on the gains, and immediately repurchase the same stock to reset your cost basis to the higher price. This is the mirror image of tax-loss harvesting—you are intentionally realizing gains when they are free, which reduces future tax liability. This strategy is particularly powerful during gap years, sabbaticals, early retirement before claiming Social Security, or any period of low income.[6, 19]

Strategy 4: Use the Right Cost Basis Method (HIFO/SpecID). As detailed in Section 5, switching from the default FIFO to HIFO (Highest In, First Out) or Specific Identification can dramatically reduce the taxable gain on any sale. This is a set-it-and-forget-it optimization: log in to your brokerage, change your default cost basis method to HIFO or SpecID, and every future sale will automatically minimize the realized gain. There is no downside—your total unrealized gains remain the same; you are simply deferring recognition to later, higher-basis lots.[2]

Strategy 5: Tax-Loss Harvesting. When holdings decline in value, selling them to realize capital losses creates a tax asset: those losses offset current or future gains dollar-for-dollar, and up to $3,000 per year of net losses can be deducted against ordinary income. The key compliance requirement is the wash sale rule—you cannot repurchase a "substantially identical" security within 30 days before or after the sale. For a comprehensive walkthrough, see our complete tax-loss harvesting guide, which covers mechanics, wash sale compliance, and how to reinvest the tax savings for compound growth.[1]

Strategy 6: Donate Appreciated Stock to Charity. If you donate stock that you have held for more than one year to a qualified charity, you receive a double tax benefit: (1) you deduct the full fair market value of the stock as a charitable contribution (subject to AGI limitations), and (2) you pay zero capital gains tax on the appreciation—the built-in gain is permanently eliminated, not just deferred. Per IRS Publication 526, the deduction for appreciated capital gain property donated to a public charity is limited to 30% of AGI, with a five-year carryforward for any excess. This is significantly more tax-efficient than selling the stock, paying capital gains tax, and then donating the after-tax proceeds in cash.[11]

Strategy 7: Qualified Opportunity Zone (QOZ) Funds. If you realize a capital gain from any source, you can invest some or all of that gain into a Qualified Opportunity Zone Fund within 180 days and defer the tax on the original gain until the earlier of the date you sell the QOZ investment or December 31, 2026 (under current rules). If you hold the QOZ investment for at least 10 years, any appreciation on the QOZ investment itself is permanently excluded from income. The OBBBA introduced an updated "OZ 2.0" framework taking effect in 2027, which modifies the deferral and exclusion rules. QOZ investing involves illiquidity and risk, but for large realized gains, the tax deferral and potential exclusion can be significant.[12, 14]

Strategy 8: Installment Sales for Large Gains. If you are selling a large, concentrated stock position (e.g., from a company sale or vesting event), an installment sale can spread the recognition of the gain over multiple tax years, keeping you in lower brackets each year. Under IRS Publication 537, an installment sale is a sale where at least one payment is received after the tax year of the sale. You report a proportional amount of the gain with each payment received. While installment sales are more common in real estate and private business transactions, they can be structured for large stock blocks in certain circumstances, particularly in private company stock sales or negotiated block trades.[13]

Stepped-Up Basis at Death: The Ultimate Capital Gains Tax Elimination

Of all the provisions in the U.S. tax code related to capital gains, the stepped-up basis at death is arguably the most powerful. When a person dies, the cost basis of their appreciated assets is "stepped up" to the fair market value on the date of death. All unrealized capital gains accumulated during the decedent's lifetime are permanently eliminated—not deferred, not transferred, but erased. The heirs inherit the assets at the new, higher basis. If they sell immediately, there is zero capital gain.[17]

Consider a concrete example. Suppose a parent purchased $100,000 of stock in 2000 that grew to $1,000,000 by the time of their death in 2026. The unrealized gain is $900,000. If the parent had sold before death, they would owe approximately $171,000 in federal capital gains tax (20% + 3.8% NIIT on $900,000). But with the stepped-up basis, the heirs inherit the stock at $1,000,000 basis. If they sell immediately for $1,000,000, the gain is $0 and the tax is $0. That $171,000 in taxes simply vanished.[4, 17]

The OBBBA preserved the stepped-up basis and simultaneously raised the federal estate tax exemption to $15,000,000 per individual ($30,000,000 for married couples), indexed for inflation after 2026. This means the vast majority of American families—well over 99%—will neither owe estate tax nor lose the benefit of the stepped-up basis. The combination is extraordinarily powerful: a married couple can pass $30 million in assets to their heirs with zero estate tax and zero capital gains tax on all unrealized appreciation. The exemption amount is "permanent" under OBBBA with no scheduled sunset, unlike the TCJA version that was set to revert to approximately $7 million per person in 2026.[25, 26]

This provision has profound implications for investment strategy. For positions with enormous unrealized gains, it may be more tax-efficient to hold them indefinitely rather than sell and reinvest, particularly for older investors or those engaged in estate planning. The "buy, borrow, die" strategy takes this to its logical extreme: accumulate appreciated assets, borrow against the portfolio for living expenses (loan proceeds are not taxable income), and let heirs inherit with a stepped-up basis that eliminates the capital gains. However, two important caveats: (1) Stepped-up basis does not apply to "income in respect of a decedent" (IRD) items, such as distributions from traditional IRAs and 401(k)s—those are taxed as ordinary income to the beneficiary. (2) Some states impose their own estate or inheritance taxes at lower thresholds than the federal exemption.[4, 25]

Advertisement
Quick Tip

Compound Interest Tips

Rule of 72: Divide 72 by your annual return rate to estimate how long it takes to double your money. Regular contributions and dividend reinvestment accelerate growth significantly.

Frequently Asked Questions About Capital Gains Tax on Stocks

Below are the most common questions investors ask about capital gains taxes. Each answer is grounded in current IRS rules and the 2026 tax code as amended by the OBBBA.

What is the capital gains tax rate on stocks in 2026?

+

Long-term capital gains (held over one year) are taxed at 0%, 15%, or 20% depending on your taxable income and filing status. For single filers, the 0% rate applies up to $49,450, the 15% rate from $49,451 to $545,500, and the 20% rate above $545,500. High earners also pay a 3.8% Net Investment Income Tax (NIIT) when MAGI exceeds $200,000 (single) or $250,000 (married filing jointly), making the effective maximum 23.8%. Short-term gains (held one year or less) are taxed at ordinary income rates of 10% to 37%. The OBBBA permanently extended these rates, so they will not revert to pre-TCJA levels.

What is the difference between short-term and long-term capital gains?

+

The difference is the holding period. If you hold a stock for more than one year (at least one year and one day), the gain is long-term and taxed at preferential rates (0%, 15%, or 20%). If you hold it for one year or less, the gain is short-term and taxed at your ordinary income rate (10% to 37% in 2026). The IRS uses the trade date, not settlement date, for determining the holding period. For a taxpayer in the 32% bracket, this distinction can mean the difference between a 15% and 32% tax rate on the same gain—a savings of 17 cents on every dollar.

Do I pay capital gains tax if I sell stock at a loss?

+

No. Selling at a loss creates a capital loss, not a gain. Capital losses offset capital gains dollar-for-dollar. If your total losses exceed your gains, you can deduct up to $3,000 per year ($1,500 if married filing separately) against ordinary income. Any remaining losses carry forward to future tax years indefinitely. However, be aware of the wash sale rule: if you repurchase a substantially identical security within 30 days before or after the sale, the loss is disallowed. See our tax-loss harvesting guide for detailed strategies.

How do I calculate cost basis for stocks?

+

Cost basis is generally the purchase price plus any commissions or fees. If you bought shares at different times and prices, each purchase creates a separate "tax lot." You can use several methods to determine which lots you are selling: FIFO (first purchased sold first—the default), LIFO (last purchased sold first), HIFO (highest cost sold first—minimizes gain), Specific Identification (you choose the exact lots), or Average Cost (mutual funds only). For DRIP shares, each reinvested dividend is a separate lot. Post-2011 stock purchases are reported by your broker on Form 1099-B; for older shares, you must maintain your own records.

What is the Net Investment Income Tax (NIIT) and who pays it?

+

The NIIT is a 3.8% surcharge on net investment income (including capital gains, dividends, interest, and rental income) that applies when your modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married filing jointly. These thresholds have not been adjusted for inflation since 2013, so more taxpayers are affected each year. The NIIT pushes the effective maximum federal rate to 23.8% on long-term gains and 40.8% on short-term gains. Retirement plan distributions (IRA, 401(k)) are excluded from net investment income.

Do I owe state taxes on capital gains in addition to federal?

+

In most states, yes. The majority of states tax capital gains as ordinary income with no preferential rate for long-term gains. Top state rates include California (13.3%), New York (10.9%), and New Jersey (10.75%). Nine states have no income tax: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire (which does not tax capital gains). Washington is unique—it has a 7% capital gains excise tax on long-term gains above approximately $278,000. Combined federal, state, and NIIT rates can exceed 38% in high-tax states.

Can I avoid capital gains tax by holding stock until I die?

+

Effectively, yes. Under the stepped-up basis rule, when a person dies, the cost basis of their appreciated assets is reset to fair market value at the date of death. All unrealized capital gains are permanently eliminated. Under the OBBBA, the estate tax exemption is $15 million per individual ($30 million for married couples), so the vast majority of estates will owe neither estate tax nor capital gains tax. However, this does not apply to tax-deferred accounts like traditional IRAs and 401(k)s—those distributions are taxed as ordinary income to the beneficiary regardless of the step-up.

What happens if I donate appreciated stock to charity?

+

If you donate stock held for more than one year to a qualified charity, you receive a double benefit: a tax deduction for the full fair market value of the stock (limited to 30% of AGI for appreciated property, with a five-year carryforward), and you pay zero capital gains tax on the built-in appreciation. The capital gain is permanently eliminated—not deferred. This is significantly more efficient than selling the stock, paying tax on the gain, and then donating the after-tax cash proceeds.

Are there any ways to defer capital gains tax?

+

Yes, several. (1) Tax-loss harvesting defers recognition by lowering the cost basis of replacement shares. (2) Qualified Opportunity Zone (QOZ) funds allow you to invest realized gains and defer tax until 2026 or the date of sale, whichever is earlier; holding for 10+ years can permanently exclude gains on the QOZ investment itself. (3) Installment sales spread gain recognition over multiple tax years. (4) 1031 like-kind exchanges allow indefinite deferral for real estate (but not stocks). (5) Simply not selling (holding appreciated stock indefinitely) defers the tax until sale—and if held until death, the gain is eliminated via stepped-up basis.

How can I model the impact of capital gains tax on my investments?

+

Our stock compound interest calculator lets you model after-tax investment growth. Enter your initial investment, monthly contributions, expected return rate, and the calculator shows how your portfolio grows over time. The tax impact settings allow you to factor in capital gains tax and dividend tax rates to see the difference between pre-tax and after-tax compounding. Try different scenarios—like holding for long-term vs. short-term, or investing in a tax-advantaged account—to see how your strategy affects your ending balance over 10, 20, or 30 years.

Key Takeaways: Capital Gains Tax in 2026

The OBBBA made preferential capital gains rates permanent. Long-term gains are taxed at 0%, 15%, or 20% with inflation-adjusted thresholds. There is no longer a risk of reversion to pre-TCJA rates. Short-term gains remain taxed at ordinary income rates (10%-37%).[14]

Holding period is your most powerful lever. Simply holding a stock for more than one year can reduce your tax rate by up to 17 percentage points—from 37% to 20% at the top bracket, or even from 12% to 0% for lower earners. Before selling any winning position, check whether waiting pushes you past the one-year mark.[1]

The 3.8% NIIT hits more people every year. With thresholds frozen at $200,000/$250,000 since 2013, bracket creep means an expanding share of investors pay this surcharge. The effective maximum federal rates are 23.8% (long-term) and 40.8% (short-term).[7]

Cost basis method matters more than most investors realize. Switching from default FIFO to HIFO or Specific Identification can reduce the taxable gain by 50% or more on any given sale—with no change to your portfolio or investment thesis. This is a free, one-time optimization in your brokerage settings.[2]

State taxes can add 0% to 13.3% on top of federal rates. Combined effective rates exceed 38% for long-term gains in high-tax states and 55% for short-term gains. Know your state's rules before executing large sales.[18]

Stepped-up basis at death is the most powerful tax elimination tool in the code. Under OBBBA, the $15M/$30M estate exemption and the preserved step-up mean that for over 99% of families, all unrealized capital gains are permanently eliminated at death—not deferred, not reduced, but eliminated.[17, 25]

Combine multiple strategies for maximum impact. The most tax-efficient investors do not rely on any single approach. They hold long-term, use HIFO cost basis, place tax-inefficient assets in IRAs, harvest losses in down markets, harvest gains in 0% bracket years, donate appreciated stock to charity, and plan for stepped-up basis in their estate. Use our compound interest calculator to model how these tax savings compound over decades into significantly greater wealth.[6]

References

  1. [1] IRS Topic No. 409: Capital Gains and Losses (opens in new tab)
  2. [2] IRS Publication 550: Investment Income and Expenses (opens in new tab)
  3. [3] IRS Publication 544: Sales and Other Dispositions of Assets (opens in new tab)
  4. [4] IRS Publication 551: Basis of Assets (opens in new tab)
  5. [5] IRS Topic No. 703: Basis of Assets (opens in new tab)
  6. [6] IRS Revenue Procedure 2025-32: Tax Inflation Adjustments for Tax Year 2026, Including OBBBA Amendments (opens in new tab)
  7. [7] IRS: Net Investment Income Tax (opens in new tab)
  8. [8] IRS: Questions and Answers on the Net Investment Income Tax (opens in new tab)
  9. [9] IRS: About Form 8949 — Sales and Other Dispositions of Capital Assets (opens in new tab)
  10. [10] IRS: Instructions for Schedule D (Form 1040) — Capital Gains and Losses (opens in new tab)
  11. [11] IRS Publication 526: Charitable Contributions (opens in new tab)
  12. [12] IRS: Opportunity Zones Frequently Asked Questions (opens in new tab)
  13. [13] IRS Publication 537: Installment Sales (opens in new tab)
  14. [14] IRS: One Big Beautiful Bill Provisions (opens in new tab)
  15. [15] FINRA: Capital Gains Explained (opens in new tab)
  16. [16] Tax Foundation: 2026 Tax Brackets and Federal Income Tax Rates (opens in new tab)
  17. [17] Tax Foundation: Step-Up In Basis — Glossary (opens in new tab)
  18. [18] Tax Foundation: State Individual Income Tax Rates and Brackets (opens in new tab)
  19. [19] Fidelity: 2025 and 2026 Capital Gains Tax Rates (opens in new tab)
  20. [20] Charles Schwab: One Big Beautiful Bill Act Tax Cuts (opens in new tab)
  21. [21] Vanguard: Tax-Efficient Investing (opens in new tab)
  22. [22] Kiplinger: Capital Gains Tax Rates 2025 and 2026 (opens in new tab)
  23. [23] Kiplinger: IRS Updates Capital Gains Tax Thresholds for 2026 (opens in new tab)
  24. [24] CNBC: IRS Unveils Higher Capital Gains Tax Brackets for 2026 (opens in new tab)
  25. [25] Katten Muchin Rosenman: The OBBBA — Key Year-End Tax Changes for Private Wealth Clients (opens in new tab)
  26. [26] Venable LLP: Estate Planning in the OBBBA Era — What the $15 Million Exemption Means (opens in new tab)
  27. [27] NerdWallet: 2025 and 2026 Capital Gains Tax Rates and Rules (opens in new tab)
Advertisement
Quick Tip

Compound Interest Tips

Rule of 72: Divide 72 by your annual return rate to estimate how long it takes to double your money. Regular contributions and dividend reinvestment accelerate growth significantly.