What Are Capital Gains?
Capital gains are the profit you realize when you sell a capital asset for more than you paid for it. The category covers stocks, bonds, mutual funds, real estate, cryptocurrency, business interests, artwork, collectibles, and virtually anything else you hold as an investment rather than inventory. The gain is the difference between your proceeds (what you sold it for, minus selling costs) and your cost basis (what you paid for it, plus acquisition costs like commissions). Losses work the same way — if you sell for less than basis, you have a capital loss that can offset gains and up to $3,000 of ordinary income per year. According to IRS Statistics of Income, Americans reported over $1.6 trillion in net capital gains on individual income tax returns for tax year 2021, the most recent year for which complete data is available.
The IRS distinguishes between realized and unrealized gains. A paper gain in your brokerage account is not taxed until you sell — the appreciation can compound for decades without generating a tax bill, which is one of the most powerful features of the U.S. system. The moment you sell, the gain is realized and must be reported on Form 8949 and Schedule D of your Form 1040 for the year of sale. Holding an appreciated asset until death is a planning strategy in itself: under current law, heirs receive a stepped-up basis to fair market value at the date of death, which erases all accrued gain during the deceased's lifetime. This step-up at death is estimated to cost the federal government over $50 billion per year in forgone revenue, and it is periodically targeted for restriction in proposed tax legislation.
The mechanics of reporting capital gains are more nuanced than most investors realize. Each sale must be reported on a separate line of Form 8949, with columns for the asset description, acquisition date, sale date, proceeds, cost basis, code for adjustments, and the gain or loss. Form 8949 is then aggregated onto Schedule D, which separates short-term and long-term transactions and applies the preferential long-term rates. Brokerages report most transactions to the IRS on Form 1099-B, but the investor remains responsible for accuracy — especially for older "noncovered" shares where the brokerage has no basis reporting obligation. Errors on Form 8949 are the most common audit trigger for investors, so reconciliation with brokerage statements is essential before filing.
Short-Term vs Long-Term: The Critical Distinction
The single most important factor in capital gains taxation is how long you held the asset before selling. A holding period of one year or less produces a short-term gain, taxed at your ordinary income rates — the same brackets that apply to your wages. A holding period of more than one year produces a long-term gain, taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income. The holding period clock starts the day after acquisition and ends on the day of sale, so an asset bought on January 2 and sold on January 2 of the following year qualifies as long-term. The trade date, not the settlement date, controls the timing for tax purposes.
The difference between short-term and long-term treatment can be enormous. A single filer with $100,000 of taxable income who sells $20,000 of stock for a gain pays 22% on a short-term gain, for a tax of $4,400. Hold the same position an extra few weeks to cross the one-year mark and the same gain is taxed at 15%, for a tax of $3,000 — a savings of $1,400 from waiting. Before selling any appreciated position, check the acquisition date in your brokerage account and consider whether waiting a few weeks or months materially changes the after-tax outcome. The savings compound across multiple positions and across multiple years, which is why patient investors consistently outperform traders on an after-tax basis.
| Holding Period | Tax Rate (Single, $100K Income) | Tax on $20K Gain | Savings vs Short-Term |
|---|---|---|---|
| Short-term (≤1 year) | 22% (ordinary) | $4,400 | — |
| Long-term (>1 year) | 15% | $3,000 | $1,400 (32% less tax) |
| Long-term (in 0% bracket) | 0% | $0 | $4,400 (100% less tax) |
| Long-term (in 20% bracket) | 20% + 3.8% NIIT = 23.8% | $4,760 | —$360 (worse than short-term at this income) |
The short-term/long-term distinction interacts with state taxes in important ways. Most states tax both short-term and long-term gains as ordinary income, with no preferential rate for long-term holdings. California, with its top 13.3% rate, taxes a $100,000 long-term gain at the same rate as $100,000 of wages, which means the combined federal-plus-state top rate on long-term gains for a California high earner is approximately 37.1% (23.8% federal + 13.3% state). A few states — notably Arizona, Arkansas, Hawaii (lower long-term rate), Montana, New Mexico, North Dakota, Wisconsin, and others — offer partial preferential rates or partial exemptions for long-term gains. Check your specific state's treatment before executing large sales.
The Three Long-Term Capital Gains Brackets (0/15/20%)
Long-term capital gains are taxed at three federal rates: 0%, 15%, and 20%. For 2024, the 0% bracket applies to taxable income up to $47,025 for single filers and $94,050 for married couples filing jointly. The 15% bracket covers income from $47,026 to $518,900 for singles and from $94,051 to $583,750 for joint filers. The 20% top rate kicks in above those thresholds — $518,901 for singles and $583,751 for married joint filers. These thresholds are tied to ordinary taxable income, not to the gain itself, so your wages and other income determine which bracket the gain falls into. The thresholds are indexed annually for inflation using chained CPI.
| Taxable Income (2024) | Single | Married Filing Jointly | Head of Household | Married Filing Separately |
|---|---|---|---|---|
| 0% rate up to | $47,025 | $94,050 | $63,000 | $47,025 |
| 15% rate from | $47,026 – $518,900 | $94,051 – $583,750 | $63,001 – $551,350 | $47,026 – $291,850 |
| 20% rate above | $518,900 | $583,750 | $551,350 | $291,850 |
The 0% bracket is one of the most underutilized planning opportunities in the tax code. A retired couple with $80,000 of taxable income from Social Security and pension distributions could realize up to $14,050 of long-term gains in 2024 and pay zero federal tax on them. The technique, called "gain harvesting," lets investors reset cost basis upward without triggering tax, which reduces future gains when the position is eventually sold. The strategy must be coordinated with state tax rules, Social Security taxation thresholds, and IRMAA Medicare premium surcharges, but in the right circumstances it is genuinely free money. Many taxpayers leave tens of thousands of dollars on the table annually by failing to harvest gains in low-income years.
Net Investment Income Tax (NIIT): The 3.8% Surtax
The Net Investment Income Tax (NIIT) is a 3.8% surtax that applies on top of capital gains rates for higher-income taxpayers. It kicks in when modified AGI exceeds $200,000 for single filers or $250,000 for married joint filers, and the threshold is not indexed for inflation — meaning more taxpayers become subject to it each year as nominal incomes rise. The tax applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold. Investment income for this purpose includes interest, dividends, capital gains, rental income, royalties, and passive business income — but not wages or distributions from qualified retirement plans.
| Filing Status | NIIT Threshold | 2024 Effective Top Long-Term Rate | 2024 Effective Top Short-Term Rate |
|---|---|---|---|
| Single | $200,000 MAGI | 20% + 3.8% = 23.8% | 37% + 3.8% = 40.8% |
| Married Filing Jointly | $250,000 MAGI | 20% + 3.8% = 23.8% | 37% + 3.8% = 40.8% |
| Head of Household | $200,000 MAGI | 20% + 3.8% = 23.8% | 37% + 3.8% = 40.8% |
| Married Filing Separately | $125,000 MAGI | 20% + 3.8% = 23.8% | 37% + 3.8% = 40.8% |
| Qualifying Surviving Spouse | $250,000 MAGI | 20% + 3.8% = 23.8% | 37% + 3.8% = 40.8% |
The interaction between the 20% top capital gains rate and the 3.8% NIIT produces an effective top federal rate of 23.8% on long-term gains for high earners. Add state tax — 13.3% in California, 10.9% in New York City combined, 9.85% in Minnesota — and the combined marginal rate on a long-term gain can exceed 37%. That is why high-income investors often structure sales across multiple tax years, defer gains through qualified opportunity zone investments, or donate appreciated shares to charity. The NIIT also catches many retirees who do not realize their Required Minimum Distributions push them over the threshold, because RMDs count toward MAGI but not toward investment income — a particularly frustrating interaction for taxpayers whose RMDs inadvertently trigger the surtax on their existing investment income.
A married couple filing jointly has $230,000 of wages and $40,000 of investment income (interest, dividends, and capital gains). MAGI = $270,000, which exceeds the $250,000 threshold by $20,000. NIIT applies to the LESSER of $40,000 (investment income) or $20,000 (excess over threshold) = $20,000. NIIT = 3.8% × $20,000 = $760. If the couple had $400,000 of wages and $40,000 of investment income (MAGI = $440,000, excess = $190,000), NIIT would apply to the full $40,000 of investment income = $1,520. The lesson: NIIT is calculated on a "lesser of" basis, so reducing either investment income or MAGI can reduce the tax.
Case Studies: $50k, $100k, and $500k Gains at Different Income Levels
Anna earns $60,000 in W-2 wages and realizes a $50,000 long-term gain on stock she held for three years. Her standard deduction (single) is $14,600. Taxable income computation: $60,000 wages + $50,000 LTCG − $14,600 standard deduction = $95,400 taxable income. The LTCG sits on top of wages in the calculation: ordinary taxable income = $60,000 − $14,600 = $45,400 (taxed at ordinary rates); long-term gain = $50,000 (taxed at preferential rates). The first $1,625 of the gain ($47,025 − $45,400) fills the 0% LTCG bracket, the remaining $48,375 falls in the 15% bracket. LTCG tax = ($1,625 × 0%) + ($48,375 × 15%) = $7,256.25. No NIIT because MAGI ($110,000) is below the $200,000 single threshold. Total federal tax on the gain: approximately $7,256. Effective rate on the gain: 14.5%.
The Garcias earn $200,000 combined W-2 wages and realize a $100,000 long-term gain from selling a rental property held for seven years. Standard deduction (MFJ) is $29,200. Taxable income: $200,000 + $100,000 − $29,200 = $270,800. Ordinary taxable income = $200,000 − $29,200 = $170,800 (taxed at ordinary rates). Long-term gain = $100,000 (taxed at preferential rates). All $100,000 of the gain falls in the 15% LTCG bracket (since taxable income is well below the $583,750 MFJ 20% threshold). LTCG tax = $100,000 × 15% = $15,000. NIIT check: MAGI = $300,000, exceeding the $250,000 MFJ threshold by $50,000. NIIT applies to lesser of $100,000 investment income or $50,000 excess = $50,000. NIIT = $50,000 × 3.8% = $1,900. Total federal tax on the gain: $15,000 + $1,900 = $16,900. Effective rate: 16.9%.
Dr. Chen earns $400,000 in W-2 wages and realizes a $500,000 long-term gain from selling his startup stock held for six years. Standard deduction (single) is $14,600. Taxable income: $400,000 + $500,000 − $14,600 = $885,400. Ordinary taxable income = $400,000 − $14,600 = $385,400. Long-term gain = $500,000. The first $133,500 of gain ($518,900 − $385,400) fills the 15% LTCG bracket; the remaining $366,500 falls in the 20% bracket. LTCG tax = ($133,500 × 15%) + ($366,500 × 20%) = $20,025 + $73,300 = $93,325. NIIT: MAGI = $900,000, exceeding the $200,000 threshold by $700,000. NIIT applies to lesser of $500,000 investment income or $700,000 excess = $500,000. NIIT = $500,000 × 3.8% = $19,000. Total federal tax on the gain: $93,325 + $19,000 = $112,325. Effective rate: 22.5%. Add California state tax (13.3% top rate, less federal deduction capped by SALT), and the combined rate approaches 35%.
Cost Basis Methods: FIFO, LIFO, Specific Identification, Average Cost
Cost basis is the foundation of every gain or loss calculation, and it is more complex than most investors realize. The starting point is the purchase price, but basis is increased by reinvested dividends, acquisition commissions, and certain capital improvements for real estate. Basis is reduced by return-of-capital distributions, depreciation taken on rental property, and certain casualty loss deductions. Failing to track basis accurately means overpaying tax when you sell, because the IRS defaults to a basis of zero if you cannot substantiate what you paid. For stocks purchased on or after January 1, 2011 (and mutual funds on or after January 1, 2012), brokerages are required to report basis to the IRS on Form 1099-B — but for older "noncovered" shares, the investor remains responsible for basis substantiation.
| Method | How It Works | Best For | Broker Default? | Allowed For |
|---|---|---|---|---|
| FIFO (First-In, First-Out) | Sells oldest shares first | Long-term holders wanting long-term gains | Yes (most brokers) | Stocks, ETFs, mutual funds |
| LIFO (Last-In, First-Out) | Sells newest shares first | Triggering losses in down markets | No (must elect) | Stocks, ETFs, mutual funds |
| Specific Identification | You choose which lots to sell | Tax-loss harvesting, basis optimization | No (must elect) | Stocks, ETFs (not mutual funds via average cost) |
| Average Cost (Single Category) | Averages all share costs | Mutual fund investors wanting simplicity | Optional for mutual funds | Mutual funds only |
| Average Cost (Double Category) | Separates short and long-term | Rarely used since 2011 | No | Mutual funds only |
For stock sales, brokerages report basis to the IRS on Form 1099-B, but only for shares acquired after certain implementation dates — older uncovered shares may show a blank basis that you must fill in. When selling partial positions, you can choose the default first-in, first-out (FIFO) method, or use specific identification to select which lots to sell. Specific identification lets you sell your highest-basis shares first, which minimizes the gain — a powerful technique that most brokerages support but few investors use. Reconcile your brokerage 1099-B against your own records each February, and challenge any basis the broker reports as zero if you can document otherwise. The IRS generally accepts brokerage confirmations, monthly statements, and trade logs as basis substantiation for noncovered shares.
An investor owns 1,000 shares of Apple acquired in three lots: 300 shares at $50 (2020, basis $15,000), 400 shares at $130 (2021, basis $52,000), 300 shares at $180 (2022, basis $54,000). Current price $200. She sells 500 shares for $100,000. Under FIFO (default), the oldest 500 shares are sold: 300 @ $50 + 200 @ $130 = basis $41,000, gain $59,000 (all long-term). Under Specific ID, she could sell the 400 shares at $130 + 100 shares at $180 = basis $70,000, gain $30,000 (long-term). Or sell 300 @ $180 + 200 @ $130 = basis $80,000, gain $20,000. The Specific ID election saves $39,000 in gain, which at 15% LTCG = $5,850 in tax savings — from a single trade. This is why specific identification should be the default for any taxable investor with multiple lots.
Tax-Loss Harvesting Strategy with $30k Portfolio Example
Tax-loss harvesting is the practice of intentionally selling positions at a loss to offset realized gains, then reinvesting the proceeds in a similar but not identical asset to maintain market exposure. Each dollar of realized loss offsets a dollar of realized gain dollar-for-dollar, and any excess loss can offset up to $3,000 of ordinary income per year with the remainder carrying forward indefinitely. A portfolio that generates $10,000 of long-term losses in a down year can shelter $10,000 of gains in a future up year, plus another $3,000 of wages each year until the loss is exhausted. The strategy is most valuable in high-volatility years when individual positions diverge sharply from the overall market.
An investor in the 32% federal bracket holds three positions in a $300,000 taxable portfolio: S&P 500 ETF (Vanguard VOO) with a $20,000 unrealized loss, Total International ETF (Vanguard VTIAX) with a $10,000 unrealized loss, and Apple stock with a $50,000 unrealized gain. By harvesting the $20,000 loss on VOO and the $10,000 loss on VTIAX, the investor realizes $30,000 in total losses that fully offset the $50,000 Apple gain if she sells $50,000 of Apple — leaving $20,000 of loss to offset ordinary income ($3,000 this year, $17,000 carryforward). Federal tax savings: $20,000 × 32% (ordinary offset) + $30,000 × 15% (LTCG offset) = $6,400 + $4,500 = $10,900. After harvesting, the investor reinvests the VOO proceeds in a different S&P 500 ETF (e.g., iShares IVV) and the VTIAX proceeds in a different international ETF (e.g., Schwab SCHF) to avoid wash sales while maintaining similar market exposure.
Harvesting works at the portfolio level, not just on individual positions. An investor with a $50,000 gain on Apple stock and a $20,000 loss on a broad index fund can sell the index fund to realize the loss, offset $20,000 of the Apple gain, and reinvest the proceeds in a different broad index to stay invested. The wash sale rule limits how quickly you can repurchase the same security, but there are thousands of acceptable substitute funds covering nearly every asset class. Use our Capital Gains Tax Calculator to model the after-tax impact before executing trades. Most importantly, never let tax-loss harvesting drive your investment strategy — the investment thesis should come first, and the tax benefit is a side effect.
Wash Sale Rule: Five Worked Examples
The wash sale rule disallows a loss if you buy the same or a "substantially identical" security within 30 days before or 30 days after the sale that produced the loss. The disallowed loss is not gone forever — it is added to the basis of the replacement shares, deferring the benefit until those shares are sold. The 61-day window (30 days before, the sale day, 30 days after) applies across all of your accounts, including IRAs, which means a loss in your taxable account is wiped out if you buy the same security in your IRA within the window. This cross-account rule catches many investors who auto-reinvest dividends in a falling position.
| Example | Action | Result |
|---|---|---|
| 1 | Sell 100 shares of Apple at a $5,000 loss, then buy 100 shares of Apple 10 days later | Wash sale. $5,000 loss disallowed, added to basis of new shares |
| 2 | Sell 100 shares of Apple at a $5,000 loss, then buy 50 shares of Apple and 50 shares of Microsoft 25 days later | Wash sale on 50 Apple shares. $2,500 loss disallowed. Microsoft purchase does not affect the Apple loss. |
| 3 | Sell 100 shares of Vanguard S&P 500 ETF (VOO) at a $5,000 loss, then buy iShares S&P 500 ETF (IVV) 5 days later | Generally NOT a wash sale (different fund families, different fund structures, despite tracking same index). Conservative view treats as potentially wash; aggressive view treats as safe. |
| 4 | Sell 100 shares of Apple at a $5,000 loss in taxable account, then buy 100 shares of Apple in Roth IRA 15 days later | Wash sale. Loss disallowed PERMANENTLY (because Roth IRA basis adjustments do not produce future benefit). This is the most painful wash sale outcome. |
| 5 | Sell 100 shares of Apple at a $5,000 loss on December 28, 2024, then buy 100 shares of Apple on January 5, 2025 (within 30 days after) | Wash sale. The $5,000 loss is disallowed for 2024 and added to basis of 2025 shares. Loss is NOT recognized in 2024 even though the sale occurred in 2024. |
"Substantially identical" is not precisely defined in the code, which leaves room for interpretation. Selling an S&P 500 index fund and buying a different S&P 500 index fund from another provider is generally treated as a wash by conservative practitioners, because the holdings are identical. Selling one total-market fund and buying a different total-market fund from a different provider is more defensible, because the holdings are similar but not identical. Selling an S&P 500 fund and buying a total-market fund is widely considered safe, as is selling an individual stock and buying a sector ETF. When in doubt, wait the full 31 days before repurchasing, or use a clearly different security as the replacement.
Primary Home Exclusion: Section 121
Section 121 of the Internal Revenue Code allows you to exclude up to $250,000 of gain on the sale of a primary residence ($500,000 for married couples filing jointly) if you owned and used the home as your main home for at least two of the five years immediately preceding the sale. The two years do not need to be consecutive — you can live in the home for 14 months, rent it out, move back for 10 months, and still qualify. The exclusion is available once every two years, meaning you cannot flip homes repeatedly and exclude each gain. Any gain above the exclusion is long-term if you held the home more than one year.
| Test | Requirement | Common Failure |
|---|---|---|
| Ownership test | Owned the home for ≥ 2 of the last 5 years | Added spouse to title recently; only one spouse meets test (still OK if both spouses meet, MFJ allows $500K exclusion) |
| Use test | Lived in home as primary residence for ≥ 2 of last 5 years | Rented the home for 3+ years before selling — fails use test |
| 2-year waiting period | Did not claim Section 121 exclusion in the last 2 years | Back-to-back home sales within 24 months |
| Depreciation recapture | Post-1997 depreciation claimed must be recaptured at 25% | Home office or rental use creates recapture even if exclusion applies |
Several traps narrow the benefit. If you claimed depreciation on the home as a rental or home office, that depreciation is "recaptured" and taxed at a maximum rate of 25% — the exclusion does not shelter it. If you move out and rent the home for more than three years before selling, you lose the exclusion entirely because the use test fails. If you sell within two years of a previous excluded sale, you generally cannot claim a second exclusion unless the sale was due to a job change, health issue, or other unforeseen circumstance (in which case a partial exclusion may apply based on the fraction of the 2-year period completed). The math gets complicated quickly, so model the transaction before listing the home.
A couple bought a home in 2018 for $400,000, lived in it as their primary residence through 2022, then rented it out from January 2023 through June 2024 while traveling. They claimed $20,000 of depreciation during the rental period ($4,000/year × 5 years, including depreciation begun before rental). They sell the home in July 2024 for $700,000, realizing a $300,000 gain ($700,000 − $400,000 − $20,000 adjusted basis from depreciation = $280,000 gain, plus $20,000 depreciation recapture = $300,000 total gain). Section 121 exclusion: They meet the ownership and use tests (lived there 4+ years of last 5), so $500,000 MFJ exclusion applies to the $280,000 of regular long-term gain. The $20,000 depreciation recapture is taxed at 25% = $5,000. Net federal tax on $300,000 gain: $5,000. Without the exclusion, the full $300,000 would be taxed at 15% LTCG = $45,000. The Section 121 exclusion saves the couple $40,000.
Crypto Taxation: Short-Term, Long-Term, Staking, Airdrops, NFTs
The IRS treats cryptocurrency as property for tax purposes, which means every sale, swap, or use of crypto to purchase goods or services is a taxable event. Buying $1,000 of Bitcoin and using it to buy a $1,500 laptop when Bitcoin has appreciated triggers a $500 long-term capital gain if you held the Bitcoin more than a year. Exchanging one cryptocurrency for another — Bitcoin for Ethereum, for example — is also a taxable event, even though no fiat currency changed hands. Many investors are surprised to learn they owe tax on swaps they thought were tax-deferred like-kind exchanges, which the IRS has explicitly disallowed for crypto after 2017 (and only ever allowed for real property, not personal property like crypto).
Crypto tax treatment varies by event type, and the differences are consequential. Mining income and staking rewards are taxed as ordinary income at fair market value on the date received, with that value becoming the cost basis for future disposals. Airdrops and hard fork proceeds are taxed as ordinary income at fair market value on the date the taxpayer has dominion and control. Selling mined or staked crypto triggers a second taxable event — capital gains tax on the appreciation between receipt date and disposal date. The IRS has stepped up enforcement substantially: the Form 1040 now includes a prominent question asking whether you received, sold, exchanged, or otherwise disposed of any digital asset during the year, and answering falsely carries fraud penalties.
| Crypto Event | Tax Treatment | Form | Holding Period for LTCG |
|---|---|---|---|
| Buying crypto with fiat | Not taxable | None (track basis) | Begins day after purchase |
| Selling crypto for fiat | Capital gain or loss (ST or LT) | Form 8949, Schedule D | Per holding period |
| Trading crypto for crypto | Taxable event — gain/loss on disposed crypto | Form 8949, Schedule D | Per holding period |
| Buying goods/services with crypto | Taxable event — gain/loss on disposed crypto | Form 8949, Schedule D | Per holding period |
| Mining rewards | Ordinary income at FMV on receipt | Schedule C (if business) or Schedule 1 | Begins at receipt |
| Staking rewards | Ordinary income at FMV on receipt (per IRS Rev. Rul. 2023-14) | Schedule C or Schedule 1 | Begins at receipt |
| Airdrops | Ordinary income at FMV on dominion/control | Schedule 1 (or Schedule C if business) | Begins at receipt |
| Hard fork (no new units received) | Not taxable until disposed | None at fork | Begins at fork |
| Hard fork (new units received) | Ordinary income at FMV on receipt | Schedule 1 or Schedule C | Begins at receipt |
| NFT sales (collectible treatment) | Up to 28% collectibles rate if classified as collectible | Form 8949 with code "C" | Per holding period |
| Crypto lost/stolen | Generally deductible as casualty loss only if federally declared disaster (TCJA limitation through 2025) | Form 4684 | — |
NFTs and other digital collectibles may be subject to a 28% collectibles capital gains rate if they are deemed to be collectibles under Section 408(m), though the IRS has not issued definitive guidance on which NFTs qualify. Airdrops, staking rewards, and mining income are taxed as ordinary income at fair market value on the date received, with that value becoming the cost basis for future disposals. Tracking basis across multiple wallets and exchanges is challenging, and specialized crypto tax software has become essential for active traders. The IRS has increased enforcement in this area, including a prominent question on Form 1040 asking whether you received, sold, or exchanged digital assets during the year, and the agency has begun sending educational letters to taxpayers with reported crypto activity.
Real Estate 1031 Exchange Basics
Section 1031 of the Internal Revenue Code allows real estate investors to defer capital gains tax on the sale of investment property by reinvesting the proceeds in like-kind investment property. The deferral is powerful — a $1 million gain on a property held for decades can be deferred indefinitely by exchanging into a new property, and the deferred gain is forgiven at death through the stepped-up basis rules. The TCJA eliminated 1031 eligibility for personal property (art, equipment, aircraft) effective 2018, but real property 1031 exchanges remain fully available and are one of the most valuable tax deferral tools for real estate investors.
The 1031 exchange rules have strict timing requirements. From the date of sale of the relinquished property, the investor has 45 days to identify potential replacement properties (in writing, to a qualified intermediary, with strict identification rules — typically up to 3 properties of any value, or more under the 95% or 200% rules). The investor then has 180 days from the sale date to close on one or more of the identified replacement properties. The proceeds must be held by a qualified intermediary (not the taxpayer) between the two closings, or the exchange fails. Failure to meet any of these deadlines or procedural requirements disqualifies the exchange and triggers immediate taxation of the gain.
Key 1031 Exchange Rules
- Properties must be "like-kind" — broad definition for real property (any real property for any other real property in the U.S.).
- 45-day identification window from sale of relinquished property.
- 180-day closing window from sale of relinquished property.
- Proceeds must be held by qualified intermediary (taxpayer cannot touch the cash).
- Replacement property must be of equal or greater value to defer ALL gain (if lesser value, "boot" is taxable).
- Debt on replacement must be equal or greater than debt on relinquished (or investor contributes cash to make up difference).
- Personal residence does not qualify — property must be held for investment or productive use in a trade or business.
- Partnership interests cannot be exchanged (but properties held by partnerships can be, with careful structuring).
- Deferred gain reduces basis of replacement property, ensuring eventual taxation if no further exchange or step-up at death.
QSBS (Section 1202) Exclusion for Startup Founders
Section 1202 provides one of the most powerful tax breaks in the code for startup founders and early investors. Qualified Small Business Stock (QSBS) acquired at original issue from a domestic C corporation with gross assets under $50 million at the time of issuance is eligible for a federal capital gains exclusion when held for more than five years. For stock acquired after September 27, 2010, the exclusion is the greater of $10 million or 10x the taxpayer's adjusted basis in the stock. A founder who acquires $1,000 of common stock at incorporation and sells the company ten years later for $50 million can exclude the entire $50 million from federal capital gains tax, saving roughly $11.9 million at current top rates.
Several requirements must be met for QSBS treatment. The issuing corporation must be a domestic C corporation with gross assets under $50 million at all times before and immediately after the issuance. The corporation must be an active trade or business — meaning at least 80% of its assets are used in the qualified trade or business, excluding professional services (law, medicine, consulting, accounting), banking, farming, mining, hospitality, and certain other excluded industries. The stock must be acquired at original issuance (not purchased on the secondary market), and the taxpayer must hold it for more than five years. The exclusion applies only to the federal level — many states (notably California) do not conform and tax the gain at the state level.
A founder incorporates a software company as a Delaware C corporation in 2018 and acquires 4,000,000 shares of common stock at $0.001 per share (total basis $4,000). The company grows, raises venture capital, and is acquired in 2024 for $60 million in cash. The founder's shares represent 20% of the company at exit, so the founder receives $12 million. Section 1202 exclusion: greater of $10 million or 10x basis ($40,000) = $10 million. The first $10 million of the founder's $12 million gain is excluded from federal tax. The remaining $2 million is taxed as long-term capital gain at 20% + 3.8% NIIT = 23.8% = $476,000. Without QSBS, the full $12 million would be taxed at 23.8% = $2,856,000. The QSBS exclusion saves the founder $2,380,000 in federal tax — purely for having structured as a C corporation and held the stock for more than five years.
Advanced QSBS planning includes stacking the exclusion by gifting QSBS shares to family members (each gets their own $10 million exclusion) before a sale, or rolling QSBS proceeds into new QSBS investments within 60 days under Section 1045 to restart the five-year holding period without recognizing gain. Both strategies are complex and require coordination with estate planning and corporate counsel, but they can multiply the QSBS benefit many times over. Founders who anticipate an exit should consult a QSBS specialist at least two years before the anticipated sale to ensure structuring is in place.
Common Myths vs Facts
Myth: "I should hold off selling my stock until I'm in a lower tax bracket next year."
Reality: Tax bracket timing matters, but it should be balanced against investment fundamentals. If the stock is overvalued or your thesis has changed, sell now and pay the tax. If the stock still has strong fundamentals and the gain would push you from the 15% to 20% LTCG bracket, deferring can save 5% federal plus potential NIIT interaction. Model both scenarios with realistic price assumptions before deciding.
Myth: "Crypto-to-crypto trades are not taxable because no dollars changed hands."
Reality: The IRS has been clear since 2014 (Notice 2014-21) that crypto is property, and every trade — including crypto-for-crypto — is a taxable event. Traders who failed to report these swaps in 2017-2018 have been receiving IRS educational letters and proposed assessments for years. Specialized crypto tax software can reconstruct trades from wallet and exchange history, which is essential if you have not been tracking in real time.
Myth: "I can exclude up to $250,000 of gain on my home sale every two years."
Reality: The Section 121 exclusion requires meeting BOTH the ownership and use tests (2 of last 5 years each), AND not having claimed the exclusion in the prior 2 years. If you rent out the home for more than 3 years before selling, the use test fails entirely. Depreciation claimed after May 6, 1997 must be recaptured at 25% even if the gain itself is excluded. The exclusion is one of the most valuable but most misunderstood tax breaks for homeowners.
Myth: "If I lose money on a stock, I can deduct the loss against my salary."
Reality: Capital losses offset capital gains first, then up to $3,000 of ordinary income (including salary) per year, with the remainder carrying forward indefinitely. A $30,000 loss with no gains produces a $3,000 deduction this year and a $27,000 carryforward. Unused losses never expire, but the $3,000 annual ordinary offset limit means it can take years to fully utilize a large loss. Married filing separately filers get only $1,500 per year.
Frequently Asked Questions
1. What is the difference between short-term and long-term capital gains?
Short-term capital gains result from selling an asset held for one year or less, and they are taxed at your ordinary income rates (10% to 37% for 2024). Long-term capital gains result from selling an asset held for more than one year, and they are taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income. The holding period starts the day after acquisition and ends on the day of sale, with the trade date controlling for tax purposes. Crossing the one-year mark can reduce the federal tax rate by 17 to 22 percentage points, making it one of the most consequential timing decisions in investing.
2. How do I report capital gains on my tax return?
Capital gains are reported on Form 8949 (Sales and Other Dispositions of Capital Assets) and aggregated onto Schedule D of Form 1040. Form 8949 has separate sections for short-term and long-term transactions, and within each, separate boxes for transactions reported on Form 1099-B with basis reported to the IRS, transactions reported on 1099-B without basis, and transactions not reported on 1099-B. Each sale gets its own line with description, acquisition date, sale date, proceeds, cost basis, code (for adjustments), and gain or loss. Schedule D then aggregates the totals and applies the preferential long-term rates.
3. Can I deduct capital losses on my tax return?
Yes. Capital losses first offset capital gains of the same type (short-term losses offset short-term gains first, then long-term gains). If total losses exceed total gains, up to $3,000 ($1,500 if married filing separately) of the excess can offset ordinary income per year. Any remaining loss carries forward indefinitely until used. Losses on personal-use property (your home, your car) are not deductible. Losses on investment property are deductible subject to the wash sale rule if you repurchase substantially identical securities within the 61-day window.
4. What is the wash sale rule and how do I avoid it?
The wash sale rule disallows a loss if you buy substantially identical securities within 30 days before or 30 days after the sale that produced the loss. The 61-day window applies across all your accounts, including IRAs. To avoid the rule, either wait 31 days before repurchasing the same security, or purchase a similar but not identical security as a replacement (e.g., S&P 500 ETF for total stock market ETF). The rule applies per taxpayer, not per account, so coordinated tracking across accounts is essential. The IRS has not issued comprehensive guidance on what constitutes "substantially identical" for ETFs, so conservative investors use different index providers or different indices entirely.
5. How is crypto taxed?
Cryptocurrency is treated as property for federal tax purposes. Buying crypto with fiat is not taxable. Selling crypto for fiat, trading crypto for crypto, or using crypto to buy goods/services are all taxable events that produce capital gains or losses based on holding period. Mining and staking rewards are taxed as ordinary income at fair market value on the date received. Airdrops are taxed as ordinary income on the date of dominion and control. The IRS requires disclosure of crypto activity on Form 1040, and failure to report can trigger accuracy-related penalties of 20% of the underpaid tax.
6. What is the Section 121 home sale exclusion?
Section 121 allows you to exclude up to $250,000 (single) or $500,000 (MFJ) of gain on the sale of your primary residence if you owned and used the home as your main home for at least 2 of the 5 years immediately preceding the sale. The exclusion is available once every 2 years. Depreciation claimed after May 6, 1997 (for rental or home office use) is recaptured at 25% and not excluded. If you fail the use test by renting the home for too long, the entire exclusion is lost, so timing of the move-out date is critical.
7. How does the 0% long-term capital gains bracket work?
For 2024, the 0% LTCG bracket applies to taxable income up to $47,025 (single) or $94,050 (MFJ). Taxable income includes wages, interest, dividends, and capital gains minus deductions. A retiree with $50,000 of Social Security and pension income can realize up to approximately $44,025 of long-term gains at 0% federal tax. The strategy is called "gain harvesting" and is most valuable in low-income years between retirement and Required Minimum Distributions. Watch out for IRMAA Medicare premium surcharges, which can push the effective cost of harvested gains above 0% even when the federal capital gains rate is 0%.
8. What is the Net Investment Income Tax (NIIT)?
The NIIT is a 3.8% surtax on the lesser of (a) net investment income or (b) the excess of MAGI over $200,000 (single) or $250,000 (MFJ). Investment income includes interest, dividends, capital gains, rental income, royalties, and passive business income. The tax is reported on Form 8962 and applies on top of regular capital gains rates, producing a top effective federal rate of 23.8% on long-term gains and 40.8% on short-term gains for high earners. The threshold is not indexed for inflation, so more taxpayers become subject each year.
9. What is a 1031 exchange and who qualifies?
A 1031 exchange allows real estate investors to defer capital gains tax on the sale of investment property by reinvesting the proceeds in like-kind investment property within strict timeframes (45 days to identify, 180 days to close). The property must be held for investment or productive use in a trade or business — personal residences do not qualify. The replacement property must be of equal or greater value to defer all gain. Deferred gain reduces basis in the replacement property, but the gain is forgiven at death through step-up in basis. 1031 exchanges are one of the most powerful tax deferral tools available to real estate investors.
10. What is QSBS (Qualified Small Business Stock)?
QSBS is stock in a domestic C corporation with gross assets under $50 million at the time of issuance, acquired at original issue, and held for more than 5 years. Up to $10 million or 10x basis of gain on QSBS is excluded from federal tax, making it one of the most valuable tax breaks for startup founders and early employees. The corporation must be in a qualified trade or business (excluding professional services, banking, farming, and others). The exclusion applies only at the federal level — many states (notably California) do not conform. Founders should structure for QSBS eligibility at incorporation.
11. Can I avoid capital gains tax by donating stock to charity?
Yes. Donating appreciated stock held more than one year to a qualified charity provides two tax benefits: (1) you deduct the full fair market value as a charitable contribution (subject to the 30% AGI limit for appreciated property), and (2) you pay no capital gains tax on the appreciation. The charity, being tax-exempt, can sell the shares with no tax consequence. This is one of the most tax-efficient charitable strategies available, especially for highly appreciated stock. Use a donor-advised fund to streamline the process if you want to spread gifts across multiple charities over time.
12. What happens to capital gains when I die?
Under current law, your heirs receive a stepped-up basis to fair market value at the date of your death (or the alternate valuation date six months later, if elected by the estate). This means all accrued capital gains during your lifetime are erased for income tax purposes. If you bought stock for $10,000 that is worth $1 million at your death, your heirs can sell it immediately for $1 million with zero capital gains tax. The Biden administration has proposed eliminating step-up at death for gains over $1 million ($2.5 million per couple), but the change has not been enacted. Estate tax may still apply to large estates (over $13.61 million per individual in 2024).
13. How do state taxes apply to capital gains?
Most states tax capital gains as ordinary income at the same rate as wages, with no preferential rate for long-term holdings. California's 13.3% top rate applies equally to short-term and long-term gains, producing a combined federal-plus-state top rate of approximately 37.1% on long-term gains for California residents. A few states offer partial preferences: North Dakota taxes long-term gains at a reduced rate, Montana allows a partial exclusion, New Hampshire taxes only interest and dividends (no capital gains tax), and the nine no-income-tax states (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire for earned income) impose no state capital gains tax at all. Moving to a no-tax state before a large sale can save significant state tax, but most states have "clawback" rules that look at the residency period during which the gain accrued.
Final Thoughts: Long-Term Thinking Wins
Capital gains tax is fundamentally a tax on transactions, which means the most powerful planning strategy is also the simplest: hold appreciated assets longer. Every year you defer a sale is a year of tax-free compounding, plus a year closer to the preferential long-term rate, plus a year closer to potential step-up at death. Combined with disciplined tax-loss harvesting, charitable stock donations, asset location strategy, and careful attention to the 0% bracket in low-income years, the cumulative tax savings across an investing lifetime can exceed hundreds of thousands of dollars. Use our Capital Gains Tax Calculator to model specific scenarios, and read our companion guides on How to Calculate Income Tax and Tax Planning for Investors for the broader framework. The investors who consistently pay the least tax are not the ones with the cleverest strategies — they are the ones who plan methodically, document carefully, and treat tax efficiency as a year-round discipline rather than an April scramble.