Tax Basis: How It Determines Your Gain or Loss When You Sell
March 28, 2024 · 5 min read

Tax Basis: How It Determines Your Gain or Loss When You Sell

Tax basis is the tax starting point for an investment. When you sell a stock, ETF, mutual fund, or other capital asset, the taxable result is generally the amount realized from the sale minus the basis of the shares sold. The holding period then helps determine whether that gain or loss is short-term or long-term.

For an investor who owns the same security in several purchase lots, basis is not one portfolio-level number. Each lot can have a different purchase date, basis, and tax result. That is why a sale should start with the lot records, not just the account's total return.

The Basic Calculation

For a simple purchase, basis is generally what you paid for the asset, including costs that must be capitalized. The IRS calls the result after later increases or decreases an adjusted basis. IRS Topic 703 and Publication 551 explain the broader rules.

Here is a simplified stock-sale example:

ItemAmount
100 shares bought at $80$8,000 basis
100 shares sold at $110$11,000 proceeds before selling costs
Gain before selling costs$3,000

If those shares were held for more than one year, the $3,000 is generally a long-term gain. If they were held one year or less, it is generally short-term. Selling costs and other facts can change the reported amount, so use the brokerage confirmation and tax forms when preparing a return.

Why Each Tax Lot Matters

Every purchase of the same security can create a separate tax lot. A $100 share bought in 2022 and a $100 share bought in 2025 may have very different bases even if they sit in the same account. Choosing one lot instead of another can change both the size of the realized gain and its holding-period character.

The sale method matters only if it is properly applied and documented. FIFO versus specific identification explains the tradeoff between an account's default ordering and selecting particular lots. Tax-lot optimization covers how basis, holding period, and a planned sale fit together.

Adjusted Basis Is Not Always the Purchase Price

The original purchase price is often only the first entry in the record. Events such as reinvested distributions, stock splits, return of capital, and certain corporate actions can affect the per-share or total basis. The exact treatment depends on the event and security, so keep brokerage statements and issuer notices rather than reconstructing the history only when a sale occurs.

For mutual funds, stocks, and other securities, a broker may report basis information, but the investor remains responsible for checking that the report reflects transfers, gifts, inherited assets, and transactions outside that broker. IRS Publication 550 has investment-specific recordkeeping and basis guidance. For an employer stock-purchase plan, the ESPP tax and basis guide explains why Form 3922, the W-2, and the sale record may all be needed.

Gifts and Inherited Assets Need Separate Rules

Basis is not always based on what the current owner paid. Gifted property can have carryover-basis and dual-basis rules. Inherited property generally follows a different framework that may use fair market value at the date of death or an alternate valuation date, subject to applicable rules and estate-tax reporting.

Those distinctions matter before a sale or a gift—not after. For the planning context, see estate planning with tax-loss harvesting. Do not assume a basis adjustment applies to every transfer, or that holding an investment solely for a potential future basis adjustment outweighs diversification, cash-flow, or estate-planning needs.

How Basis Connects to Tax-Loss Harvesting

Tax-loss harvesting uses the same calculation: a loss exists only when the selected lot's amount realized is below its adjusted basis. A portfolio can contain both gain lots and loss lots in the same security, so an account-level performance screen is not enough to identify the tax result of a particular sale.

A realized capital loss generally offsets capital gains. If losses exceed gains, only a remaining net capital loss can generally offset up to $3,000 of ordinary income for the year, with unused amounts carried forward under federal rules. The mechanics are covered in our tax-loss harvesting guide and the carryforward guide.

A Practical Recordkeeping Checklist

  • Keep trade confirmations and year-end brokerage tax forms.
  • Track the purchase date, shares, adjusted basis, and holding period for each lot.
  • Save records for transfers, gifts, inherited assets, splits, mergers, and return-of-capital distributions.
  • Identify the specific lot before or at the sale when that method is used.
  • Confirm the reported basis and proceeds before filing; ask a qualified tax professional about unusual transfers or complex transactions.

Bottom Line

Basis determines the gain or loss a sale puts on a tax return. Accurate lot-level records make it possible to evaluate a sale deliberately; inaccurate or incomplete records can turn a routine trade into a costly reporting problem. This is general education, not individualized tax advice.

Official Sources

Stop overpaying — get started free →