US Capital Gains Tax (Residents)
US federal capital gains tax for residents: short-term vs long-term rates, 0%/15%/20% LTCG brackets, 3.8% NIIT, §1202 QSBS exclusion, §1031 like-kind exchange, installment sales, wash sale rule, Schedule D. Trigger on: "US capital gains tax", "long-term capital gains US", "Schedule D", "LTCG rate…
Use US Capital Gains Tax (Residents) in your AI agent
Connect once and your agent applies these rules to your own numbers automatically — free, no API key.
Key facts — US Federal, 2025
| Item | Value |
|---|---|
| Short-term gains (held ≤ 12 months) | Ordinary income rates (10%–37%) |
| Long-term gains (held > 12 months) | 0%, 15%, or 20% depending on income |
| Net Investment Income Tax (NIIT) | +3.8% on net investment income above thresholds |
| Maximum effective LTCG rate | 23.8% (20% + 3.8% NIIT) |
| Annual exemption | None |
| Legislation | IRC §1(h), §1222, §1411 (NIIT) |
| Form | Schedule D + Form 8949 (attached to Form 1040) |
The full rule
Quick reference
| Item | Value |
|---|---|
| Short-term gains (held ≤ 12 months) | Ordinary income rates (10%–37%) |
| Long-term gains (held > 12 months) | 0%, 15%, or 20% depending on income |
| Net Investment Income Tax (NIIT) | +3.8% on net investment income above thresholds |
| Maximum effective LTCG rate | 23.8% (20% + 3.8% NIIT) |
| Annual exemption | None |
| Legislation | IRC §1(h), §1222, §1411 (NIIT) |
| Form | Schedule D + Form 8949 (attached to Form 1040) |
|---|---|---| | Single | Up to $48,350 | $48,351–$533,400 | Above $533,400 | | Married filing jointly | Up to $96,700 | $96,701–$600,050 | Above $600,050 | | Head of household | Up to $64,750 | $64,751–$566,700 | Above $566,700 |
Thresholds are taxable income (after deductions), not gross income.
Net Investment Income Tax (NIIT) — §1411
An additional 3.8% applies to net investment income (capital gains, dividends, interest, rental income) for taxpayers above:
- Single / head of household: $200,000
- Married filing jointly: $250,000
NIIT applies on the lesser of net investment income OR the excess of modified AGI over the threshold.
Capital loss rules
- Short-term losses offset short-term gains first; long-term losses offset long-term gains first
- Net losses of either type can offset the other after netting within type
- Up to $3,000 of net capital loss deductible against ordinary income per year
- Unused losses carry forward indefinitely (retaining their short/long-term character)
Key exclusions and deferral rules
§1202 QSBS — Qualified Small Business Stock
- Gain from sale of Qualified Small Business Stock held > 5 years is excluded from federal tax (up to $10M or 10× basis, whichever is greater)
- Company must be a C-corp with gross assets ≤ $50M at time of issuance
- Taxpayer must be the original purchaser (not secondary market)
- California does not conform — QSBS gains are taxable in CA
§1031 Like-Kind Exchange
- Gains on sale of real property can be deferred by reinvesting in like-kind property
- Must identify replacement property within 45 days; close within 180 days
- Does NOT apply to securities, personal property, or foreign real property
§121 Principal Residence Exclusion
- Gain on sale of primary residence excluded up to $250,000 (single) / $500,000 (MFJ)
- Must have owned and used as primary residence for 2 of the last 5 years
Installment sales (§453)
- Gain can be recognised over the payment period if proceeds received in instalments
- Interest imputed on deferred principal
Wash sale rule (§1091)
A capital loss is disallowed if the same or substantially identical security is purchased within 30 days before or after the sale. The disallowed loss is added to the cost basis of the replacement shares.
Collectibles and §1250 recapture
- Collectibles (art, coins, stamps): maximum 28% LTCG rate
- §1250 unrecaptured depreciation on real property: maximum 25% rate on the depreciation recapture portion
State taxes
Most states tax capital gains as ordinary income at state rates. Key exceptions:
- No state income tax: TX, FL, WA (no individual income tax), NV, WY, SD, AK, NH (no capital gains)
- CA: taxes capital gains as ordinary income at up to 13.3% + QSBS does not conform
Sources
- IRC §1(h), §1221, §1222 (capital gains and losses)
- IRC §1202 (QSBS), §1031 (like-kind exchange), §121 (principal residence), §1411 (NIIT)
- IRS Publication 550 (Investment Income and Expenses)
- Schedule D instructions (IRS.gov)
Working paper only. Confirm current-year rate thresholds from IRS inflation adjustments before computing. State CGT treatment requires separate analysis.
Pasting this into your AI section by section is slow and easy to get wrong. Connect your AI agent and it loads the whole rule automatically — with dependency resolution, conservative defaults, and a handoff to a licensed accountant when you need one.
Already have a worksheet from your AI? Get it checked by a licensed accountant.
More US Federal tax skills
Other US Federal computations in the OpenAccountants library.