Realized P&L: Tax Rules, Wash Sales, and Real Estate

Realized profit and loss, usually written as realized P&L, is the actual gain or loss you lock in when you sell or otherwise dispose of an investment. Until that sale closes, any change in value is only on paper. Once it closes, the difference between what you paid and what you received becomes a permanent number, and that number is what the IRS taxes or lets you deduct.1Office of the Law Revision Counsel. 26 U.S.C. 1001 – Determination of Amount of and Recognition of Gain or Loss

Under the Internal Revenue Code, your gain is the amount you received from the sale minus your adjusted basis in the asset. If the adjusted basis is larger than what you received, you have a realized loss instead.1Office of the Law Revision Counsel. 26 U.S.C. 1001 – Determination of Amount of and Recognition of Gain or Loss The stock can double the next day or crash to zero afterward. Your realized figure doesn’t move, because you no longer own the shares.

How to Calculate Realized P&L

The formula is simple. Subtract your adjusted cost basis from your net sale proceeds. Getting each side right is where most mistakes happen.

Adjusted Cost Basis

Your basis starts with the purchase price and adds any costs you paid to acquire the asset, such as brokerage commissions, transfer fees, and regulatory charges. Buy 100 shares at $50 with a $5 commission and your adjusted basis is $5,005, not $5,000.

Basis changes over time. Reinvested dividends increase it because you’re buying additional shares. A stock split leaves total basis the same but spreads it across more shares, lowering the per-share figure. Ignoring these adjustments is one of the most common ways investors overpay, because a lower basis produces a larger taxable gain.

Net Proceeds

Net proceeds are what you actually receive after selling costs. Those costs include brokerage commissions and small regulatory fees such as the SEC fee and the FINRA Trading Activity Fee, which brokers typically pass along to sellers.2FINRA. Trading Activity Fee Frequently Asked Questions The SEC fee applies only to the sale of exchange-listed equities, not to purchases.3Investopedia. SEC Fee Explained: Definition, Rates, and Equity Impact

A Worked Example

You buy 100 shares at $50 with a $5 commission, so your adjusted basis is $5,005. Five months later you sell all 100 at $55 and pay a $7 commission. Gross sale is $5,500. Net proceeds are $5,493. Subtract the $5,005 basis from $5,493 and your realized profit is $488.

Which Shares Count as Sold

When you sell part of a position built over time at different prices, the shares you assign to that sale change your realized P&L. Most brokerages default to first-in, first-out, treating the oldest lots as sold first. You can also use specific identification, picking the exact lot to sell, or average cost for mutual fund shares. Specific identification gives you the most control over the tax outcome, but you have to elect it at the time of the sale.

Realized Versus Unrealized P&L

Unrealized P&L is the gain or loss on an investment you still hold. Buy a stock at $50 and watch it trade at $60, and you have an unrealized gain of $10 per share. Your portfolio is worth more, but you can’t spend that $10 and you don’t owe tax on it.

The difference is permanence. Realized P&L is a historical fact. Unrealized P&L changes every trading day and can vanish overnight. It also can’t be spent. Selling converts the paper gain into cash you can reinvest or withdraw; leaving the position open keeps the gain locked inside it.

Tax Consequences When You Realize a Gain

Selling is the taxable event. However much your investment appreciates, you owe nothing to the IRS until you realize the gain by disposing of the asset.1Office of the Law Revision Counsel. 26 U.S.C. 1001 – Determination of Amount of and Recognition of Gain or Loss Once you sell, the gain or loss belongs on that year’s return.

Short-Term Versus Long-Term Rates

How long you held the asset before selling sets the rate. Assets held one year or less produce short-term capital gains, taxed at ordinary income rates. For 2026, the top ordinary rate is 37% for single filers with taxable income above $640,600 and married couples filing jointly above $768,700.4Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026

Assets held more than one year produce long-term capital gains, taxed at 0%, 15%, or 20% depending on taxable income.5Internal Revenue Service. Topic No. 409, Capital Gains and Losses For 2026, single filers pay 0% on long-term gains up to $49,450 in taxable income, 15% from $49,450 to $545,500, and 20% above $545,500. Married couples filing jointly hit 15% at $98,900 and 20% at $613,700. The gap between 37% and 15% or 20% is why holding periods deserve close attention.

Net Investment Income Tax

Higher earners face an added 3.8% tax on net investment income, including realized capital gains. This surtax applies when modified adjusted gross income exceeds $200,000 for single filers, $250,000 for married couples filing jointly, or $125,000 for married individuals filing separately.6Office of the Law Revision Counsel. 26 U.S.C. 1411 – Imposition of Tax Those thresholds are not indexed for inflation, so more taxpayers cross them each year. At the top end, a short-term gain can face a combined federal rate above 40% once the surtax is layered on.7Internal Revenue Service. Net Investment Income Tax

How Your Broker Reports the Sale

Your brokerage reports every sale to you and the IRS on Form 1099-B, listing gross proceeds, cost basis for covered securities, and acquisition and sale dates.8Internal Revenue Service. Instructions for Form 1099-B You carry those figures to Schedule D of your Form 1040. Verify the cost basis, especially for shares acquired through dividend reinvestment, gifts, or corporate actions, because broker records can be incomplete or wrong for older or transferred positions.

What Happens When You Realize a Loss

Realized losses offset realized gains dollar for dollar. Realize $10,000 in gains and $6,000 in losses in the same year and you’re taxed on $4,000 of net gain. Short-term losses offset short-term gains first, and long-term losses offset long-term gains first, before any leftover crosses over to the other category.

If total realized losses exceed total realized gains, you can deduct up to $3,000 of the excess against ordinary income, or $1,500 if married filing separately.9Office of the Law Revision Counsel. 26 U.S.C. 1211 – Limitation on Capital Losses Anything beyond that carries forward to future years indefinitely, so tracking the carryforward balance matters long after the original sale.5Internal Revenue Service. Topic No. 409, Capital Gains and Losses

The Wash Sale Rule

Investors sometimes try to realize a loss for tax purposes while immediately buying the same stock back. The IRS blocks this. Under the wash sale rule, if you sell a security at a loss and buy a substantially identical one within 30 days before or after the sale, the loss is disallowed.10Office of the Law Revision Counsel. 26 U.S.C. 1091 – Loss From Wash Sales of Stock or Securities

The window runs in both directions, creating a 61-day blackout. Buying replacement shares first and then selling the original lot within 30 days triggers the same rule. The disallowed loss isn’t gone; it gets added to the cost basis of the replacement shares, and your holding period for the new shares includes the time you held the original ones.11Internal Revenue Service. Publication 550 – Investment Income and Expenses

The rule also applies when your spouse buys the substantially identical stock, or when you repurchase it inside an IRA or Roth IRA. The IRA scenario is particularly costly, because the disallowed loss may be permanently lost rather than added to basis, since IRA shares have no individual cost basis tracking for tax purposes.

A Boundary Worth Knowing: Real Estate

One major exception to the “sell it, pay tax on it” pattern applies to investment real estate. Under a Section 1031 like-kind exchange, you can sell an investment property and defer the entire realized gain by reinvesting the proceeds into another qualifying property.12Internal Revenue Service. Like-Kind Exchanges – Real Estate Tax Tips The rules are strict, the property must be held for business or investment use rather than as a primary residence, and any cash received in the exchange is taxable. Ordinary stock, bond, and fund sales don’t get this treatment. For those, realization and taxation happen together.