Capital Gains and the Wash-Sale Rule
Capital gains and wash sales: law
Every source this hub relies on, strongest first. Cases are labelled by court and whether they bind.
Code
- Code I.R.C. § 1 Tax rates, including the maximum capital gains rate in 1(h)Net capital gain is taxed at lower rates than ordinary income: 0%, 15% or 20%, depending on where your taxable income falls, with higher maximums for unrecaptured section 1250 gain (25%) and for collectibles and section 1202 gain (28%). Qualified dividends are taxed the same way as net capital gain. For years after 2017 section 1(j)(5) sets the taxable income bands for the lowest two rates, adjusted for inflation each year.
- Code I.R.C. § 1001 Determination of amount of and recognition of gain or lossGain is the amount realized over your adjusted basis; loss is the adjusted basis over the amount realized. The amount realized is money plus the fair market value of other property received. The whole gain or loss is recognized unless another provision says otherwise.
- Code I.R.C. § 1012 Basis of property: costThe basis of property is generally its cost. For specified securities (including digital assets) the conventions in the regulations apply account by account, and stock bought through a dividend reinvestment plan has its own average-basis rule.
- Code I.R.C. § 1014 Basis of property acquired from a decedentThe basis of property you get from a decedent is generally its fair market value at the date of death (or the alternate valuation date, if the estate chose it). The value cannot exceed the final estate tax value where that value has been determined and the property increased the estate tax. Property you gave the decedent within a year of death comes back at the decedent's basis.
- Code I.R.C. § 1015 Basis of property acquired by giftsA gift keeps the donor's basis (carryover basis). But if that basis is higher than the property's fair market value at the time of the gift, then for figuring a loss the basis is the lower fair market value. Part of any gift tax paid on the gift can add to basis, never above fair market value.
- Code I.R.C. § 1031 Exchange of real property held for productive use or investmentNo gain or loss is recognized on an exchange of real property held for productive use in a trade or business or for investment solely for like-kind real property; the property to be received must be identified within 45 days and received within 180 days (or by the return due date, if earlier). This hub only points to the rule; the like-kind exchange hub covers it.
- Code I.R.C. § 1091 Loss from wash sales of stock or securitiesNo loss deduction is allowed on a sale of stock or securities if, in the period from 30 days before to 30 days after the sale, you acquire (by purchase or a fully taxable exchange) substantially identical stock or securities, or enter into a contract or option to acquire them. The disallowed loss is added to the basis of the replacement shares, and the old holding period carries over to them. The statute speaks of 'stock or securities'; it does not mention IRAs or spouses, and it does not mention digital assets.
- Code I.R.C. § 121 Exclusion of gain from sale of principal residenceGross income does not include gain on the sale of a principal residence you owned and used for periods adding up to at least 2 years in the 5 years before the sale, up to a dollar limit ($250,000, or $500,000 for many joint filers). This hub only points to the rule; the home sale hub covers it.
- Code I.R.C. § 1211 Limitation on capital lossesFor individuals, capital losses are allowed only up to capital gains, plus the lower of $3,000 (half that if married filing separately) or the excess of losses over gains.
- Code I.R.C. § 1212 Capital loss carrybacks and carryoversA net capital loss that an individual cannot use this year carries forward to the next year, keeping its short-term or long-term character, with no time limit. In working out the carryover, the amount you were allowed to deduct against other income is treated as a short-term gain.
- Code I.R.C. § 1221 Capital asset definedA capital asset is any property you hold, whether or not connected with a business, except the listed exclusions: inventory and property held for sale to customers, depreciable business property and real property used in a business, certain creative works, certain receivables and a few others.
- Code I.R.C. § 1222 Short-term and long-term capital gains and losses, and the netting termsLong-term means a capital asset held for more than a year; short-term means a year or less. The section also defines net short-term, net long-term and 'net capital gain' (net long-term gain over net short-term loss).
- Code I.R.C. § 1223 Holding period of propertyYou tack on the period someone else held the property when your basis carries over from them (a gift). A replacement purchase that caused a wash sale takes the holding period of the stock sold. Property you get from a decedent and sell within a year of death is treated as held more than a year.
- Code I.R.C. § 1411 Net investment income taxA 3.8% tax on the lesser of net investment income or the amount by which modified adjusted gross income exceeds $200,000 (single and head of household), $250,000 (joint) or $125,000 (married filing separately). Net investment income includes net gain from the disposition of property other than property held in an active trade or business.
- Code I.R.C. § 165 LossesSection 165(f) says losses from sales or exchanges of capital assets are allowed only to the extent allowed in sections 1211 and 1212. Section 165(g) treats a security that becomes worthless as sold on the last day of the year.
- Code I.R.C. § 6045 Returns of brokersBrokers file returns showing each customer's gross proceeds and, for covered securities (stock, debt, certain commodities and, from the applicable date, digital assets), the adjusted basis and whether gain or loss is long-term or short-term. Without an adequate identification from the customer, the broker uses first-in, first-out. A broker applies the wash sale rule only to identical securities in the same account. Statements to customers are due on or before February 15 of the next year (February 16, 2027 for 2026 sales after the weekend and holiday rule).
Session law
- Final regulation Treas. Reg. § 1.1012-1 Basis of property: identifying what you sold, average basis, and digital assetsIf you cannot adequately identify the shares you sold, the shares are treated as sold first-in, first-out. Identification of shares held with a broker is made by telling the broker, no later than the sale, which lot to sell. Stock in a regulated investment company (a mutual fund) may use average basis. Paragraph (j) applies the same ideas to digital assets: specific identification of units, or first-in, first-out when none is made, with basis and holding period tracked wallet by wallet or account by account for acquisitions and dispositions on or after January 1, 2025.
- Final regulation Treas. Reg. § 1.1091-1 Losses from wash sales of stock or securitiesRestates the 30-days-each-side rule, treating the whole span as a single period around the sale. When fewer shares are bought than sold, the replacement shares are matched to the shares sold in the order bought; when at least as many are bought, the shares sold are matched to the replacements in the order acquired. 'Acquired' includes entering a contract or option to buy. The examples show a partial wash sale and the basis adjustment.
- Final regulation Treas. Reg. § 1.1211-1(b) Limitation on capital losses of taxpayers other than corporationsAn individual may deduct capital losses for the year plus carried-over losses, only to the extent of capital gains, plus the section 1211(b) amount. The regulation's examples work through the limit and the carryover.
- Final regulation Treas. Reg. § 1.1223-1(d) Holding period of replacement shares after a wash saleIf buying stock caused a loss on substantially identical stock to be disallowed under section 1091, the holding period of the new stock includes the period you held the stock whose loss was not allowed.
- Final regulation Treas. Reg. § 1.6045-1 Broker reporting, including digital assets and wash salesBrokers report sales of digital assets on Form 1099-DA (final regulations T.D. 10000, July 2024; the separate rule for decentralized brokers was voided by Congress in April 2025). The rules apply to sales of digital assets on or after January 1, 2025 (paragraph (q)); basis reporting applies to covered securities, which for digital assets means units acquired in a custodial account on or after January 1, 2026 (paragraph (a)(15)(i)(J)). Paragraph (d)(6)(iii) has the wash sale rule for brokers: same account (or wallet), same identifier number.
IRS guidance
- Notice Notice 2014-21, 2014-16 I.R.B. 938 Virtual currency is property IRS notice (guidance)For federal tax purposes virtual currency is treated as property, and the general rules for property transactions apply. The basis of virtual currency received for goods or services is its fair market value in U.S. dollars on the date of receipt (Q&A 4). Whether gain or loss is capital or ordinary depends on whether the virtual currency is a capital asset in your hands (Q&A 7).
- Notice Notice 2025-7 Temporary relief on identifying digital asset units held with a broker IRS notice (guidance)For units of a digital asset held in a broker's custody and sold during 2025, a taxpayer could make an adequate identification by recording the units (or a standing order) on the taxpayer's own books before the sale, instead of using the broker's method. The relief period ended December 31, 2025.
- Revenue procedure Rev. Proc. 2024-28 Allocating unused digital asset basis to each wallet or account IRS revenue procedure (safe harbor)A safe harbor under section 1012(c)(1) on which taxpayers may rely to allocate unused basis of digital assets to the assets held in each wallet or account as of January 1, 2025. The allocation is generally due by the first sale of that type of digital asset on or after that date, and it is irrevocable.
- Revenue ruling Rev. Rul. 2008-5, 2008-3 I.R.B. 271 A purchase by your IRA or Roth IRA is a wash saleIf you sell stock at a loss and cause your IRA or Roth IRA to buy substantially identical stock within 30 days before or after the sale, the loss is disallowed under section 1091. Your basis in the IRA or Roth IRA is not increased under section 1091(d), so the loss is not preserved anywhere. The ruling reasons from the taxpayer's actual command over the IRA's purchase; it does not mention spouses.
Case
- Case (court of appeals) Gantner v. Commissioner, 905 F.2d 241 (8th Cir. 1990), aff'g 91 T.C. 713 (1988) Under the 1980 statute, an option to buy stock was not a 'share' of 'stock or securities' for the wash sale ruleThe court read section 1091 by its plain language. Under the 1980 text an option to buy stock was not a share of 'stock or securities', so a loss on options was not disallowed, and the court did not look past the words to the legislative history or to definitions in other laws. Congress has since amended section 1091 to include contracts or options to acquire or sell stock or securities.
Form or publication
- Publication IRS Publication 550 (2025) Investment Income and Expenses: Capital Gains and Losses, Holding Period, Wash Sales Form instructions (not authority)Holding period: counting starts the day after you acquire the property and the day you sell is included; more than a year is long-term. Capital losses: deduction limit is the lesser of $3,000 (half that if married filing separately) or your total net loss; the rest carries over. Wash sales: includes buying for your IRA or Roth IRA, and (the publication's position) a purchase by your spouse or a corporation you control; the disallowed loss is added to the basis of the new stock (except an IRA purchase) and the holding period carries over. Digital assets are property.
- Publication IRS Publication 551 (Rev. December 2025) Basis of Assets Form instructions (not authority)The basis of purchased stock is the price plus costs of purchase. If you cannot identify which shares you sold, the shares acquired first are treated as sold first. Mutual fund shares may use an average basis. Gift basis is the donor's basis, or the fair market value at the time of the gift if you have a loss. Inherited property generally takes its fair market value at the date of death (or the alternate valuation date); some beneficiaries must use the estate tax value shown on Schedule A (Form 8971).
- IRS web page IRS, Digital assets Digital assets: reporting and Form 1099-DA timing IRS web page (not authority)Brokers must report gross proceeds for transactions effected on or after January 1, 2025 and basis on certain transactions effected on or after January 1, 2026. The Form 1040 digital asset question asks whether you received digital assets as payment or as an award, or sold, exchanged or otherwise disposed of a digital asset or a financial interest in one.
- Form instructions Instructions for Form 1099-B (2026) Proceeds From Broker and Barter Exchange Transactions Form instructions (not authority)Box 1e is cost or other basis; box 1g is a wash sale loss disallowed (required where the sale and purchase are in the same account for covered securities with the same CUSIP number); box 2 is the type of gain or loss; box 5 marks a noncovered security; box 12 shows whether basis was reported to the IRS.
- Form instructions Instructions for Form 1099-DA (2026) Digital Asset Proceeds From Broker Transactions Form instructions (not authority)For sales a broker effects after 2025 the broker reports gross proceeds on all digital assets and basis for covered securities; a digital asset acquired before 2026 is noncovered. Box 1f is proceeds, box 1g is cost or other basis, box 1i is a wash sale loss disallowed (for tokenized securities), box 2 shows whether basis was reported to the IRS, and box 9 marks a noncovered security.
- Form instructions Instructions for Form 8949 (2025) Sales and Other Dispositions of Capital Assets Form instructions (not authority)Boxes A to F (and new boxes G to L for digital assets) sort your sales by whether you received a Form 1099-B or Form 1099-DA and whether basis was reported to the IRS. Code B in column (f) corrects the basis; code W reports a nondeductible wash sale loss as a positive number in column (g). Exception 1 lets you skip Form 8949 for transactions with basis reported to the IRS and no adjustments.
- Form instructions Instructions for Schedule D (Form 1040) (2025) Capital Gains and Losses Form instructions (not authority)Schedule D combines the totals of Form 8949 (lines 1b to 3 short-term; 8b to 10 long-term), adds carryovers (lines 6 and 14), and gives the net short-term (line 7) and net long-term (line 15) results. Line 16 is the total; line 21 is the capital loss deduction. The Capital Loss Carryover Worksheet figures the carryover to the next year.
Where the numbers come from
Checked
Every figure above comes from the source listed here, with the date we checked it and the date it is due for a re-check.
- Deadlines: form 1099 b 2026IRC 6045(b) checked 2026-10-19, review by 2027-02-16
cf-2026:deadlines.form_1099_b_2026 - Digital assets: broker reporting start datesTreas. Reg. 1.6045-1(q) checked 2026-10-22, review by 2027-01-19
cf-2026:digital_assets.broker_reporting_start_dates - Digital assets: per wallet basis dateTreas. Reg. 1.1012-1(j) checked 2026-10-22, review by 2027-01-19
cf-2026:digital_assets.per_wallet_basis_date - Equity comp: wash sale window daysIRC 1091(a) checked 2026-10-19, review by 2027-01-19
cf-2026:equity_comp.wash_sale_window_days - Home sale: ownership use test yearsIRC 121(a) checked 2026-10-19, review by 2027-01-19
cf-2026:home_sale_121.ownership_use_test_years - Like kind 1031: deadlines daysIRC 1031(a)(3) checked 2026-10-19, review by 2027-01-19
cf-2026:like_kind_1031.deadlines_days - Capital gains: rates26 U.S.C. sec. 1(h) checked 2026-09-24, review by 2027-01-22
federal-2026:capital_gains.rates - Home sale exclusion: maximum gain excluded26 U.S.C. sec. 121(b) checked 2026-09-24, review by 2027-01-22
federal-2026:home_sale_exclusion.max_gain_excluded - Itemized deductions: capital loss limit vs ordinary income26 U.S.C. sec. 1211(b) checked 2026-09-24, review by 2027-01-22
federal-2026:itemized_deductions.capital_loss_limit_vs_ordinary_income - Payroll and SE tax: niit rate26 U.S.C. sec. 1411(a)(1) checked 2026-09-24, review by 2027-01-22
federal-2026:payroll_and_se_tax.niit_rate_pct - Payroll and SE tax: niit threshold MAGI, married filing jointly and surviving spouseIRS Net Investment Income Tax page; 26 U.S.C. sec. 1411(b) checked 2026-10-12, review by 2027-02-09
federal-2026:payroll_and_se_tax.niit_threshold_magi.married_filing_jointly_and_surviving_spouse - Payroll and SE tax: niit threshold MAGI, married filing separatelyIRS Net Investment Income Tax page; 26 U.S.C. sec. 1411(b)(2) checked 2026-10-12, review by 2027-02-09
federal-2026:payroll_and_se_tax.niit_threshold_magi.married_filing_separately - Payroll and SE tax: niit threshold MAGI, single and head of householdIRS Net Investment Income Tax page; 26 U.S.C. sec. 1411(b)(3) checked 2026-10-12, review by 2027-02-09
federal-2026:payroll_and_se_tax.niit_threshold_magi.single_and_head_of_household