Now accepting new clients! Get Started

Tax Glossary

What Is a Capital Gain? Tax Rules and Example

Learn how a capital gain is calculated, when it becomes taxable, how holding period affects federal tax, and how California treats the gain.

A capital gain generally occurs when you sell or otherwise dispose of a capital asset for more than its adjusted basis after considering selling costs. Capital assets commonly include stocks, bonds, mutual-fund shares, investment real estate, cryptocurrency, and personal property.

A gain can be real economically before it is recognized for tax. If an investment increases in value while you continue to own it, the increase is usually an unrealized gain. A sale, exchange, or other taxable disposition generally realizes the gain and may require it to be reported.

How to calculate a capital gain

The basic calculation is:

Amount realized − adjusted basis = gain or loss

Amount realized generally includes cash received, the fair market value of other property received, and debt from which the seller is relieved, reduced by qualifying selling expenses. Adjusted basis usually begins with cost, then changes for items such as reinvested distributions, purchase costs, improvements, depreciation, stock splits, returns of capital, gifts, inheritance, or wash-sale adjustments.

Suppose Alex sells shares for $18,000. Alex's adjusted basis is $12,000, and a $300 transaction cost reduces the amount realized:

$18,000 proceeds − $300 selling cost − $12,000 adjusted basis = $5,700 capital gain

Using only the original purchase price or the number on Form 1099-B can produce the wrong result. Basis records are especially important for inherited or gifted property, employee stock, reinvested dividends, cryptocurrency transfers, and assets acquired before broker basis reporting.

Short-term vs. long-term capital gain

A gain is generally short-term when the capital asset was held for one year or less and long-term when it was held for more than one year. The holding period usually begins the day after acquisition and includes the day of sale.

Net short-term capital gains generally receive ordinary federal income-tax rates. Net long-term capital gains may qualify for federal rates of 0%, 15%, or 20%, depending on taxable income and filing status. Those labels do not guarantee one rate. Collectibles gain, unrecaptured Section 1250 gain, qualified small-business stock, home-sale exclusions, installment sales, and business-property rules can produce different treatment. The 3.8% net investment income tax may also apply to some higher-income taxpayers.

California difference Federal law may provide preferential rates for net long-term capital gain. California generally taxes both short-term and long-term capital gain as ordinary income. It does not provide a separate lower rate for long-term gain — a significant difference that affects planning for California residents and anyone selling California-source property.

How gains and losses are netted

Taxpayers do not normally apply a rate to every sale separately. Short-term gains and losses are combined, and long-term gains and losses are combined. If one group is a gain and the other a loss, they are netted against each other. The resulting net capital gain or loss then affects the return.

This sequencing matters. A $10,000 long-term gain and a $10,000 short-term loss may net to zero even though the components otherwise would have different rates. Capital-loss carryovers from prior years also enter the calculation.

Where a capital gain is reported

Broker and exchange records may include Form 1099-B. Real estate sales may be reported on Form 1099-S, and mutual funds may report capital-gain distributions on Form 1099-DIV.

Many sales are listed on Form 8949, including proceeds, basis, adjustment codes, and gain or loss. Totals flow to Schedule D. Some transactions can be reported directly on Schedule D, and business or depreciable property may first appear on Form 4797. A home sale can require Form 8949 even when some gain is excluded.

The taxpayer remains responsible for correct reporting. A missing information form does not make a taxable sale disappear, and broker-reported basis may need an adjustment.

Capital gain vs. capital-gain distribution

A capital gain generally results from your disposition of an asset. A capital-gain distribution can be allocated by a mutual fund or regulated investment company even when you did not sell your shares. Both may affect Schedule D, but the event, information form, and basis consequences differ.

Federal and California treatment

Federal law may provide preferential rates for net long-term capital gain. California generally taxes both short-term and long-term capital gain as ordinary income; it does not provide a separate lower rate for long-term gain.

California generally begins with federal capital gain or loss, but an adjustment may be needed when federal and California basis differs or when state law does not conform to a federal provision. California Schedule D (540) and Schedule CA (540) may be involved. Residents are generally taxed on capital gains from all sources, while nonresident sourcing depends on the property and transaction.

Common mistakes

  • Treating gross proceeds as taxable gain
  • Forgetting selling expenses or basis adjustments
  • Assuming every long-term gain receives a 15% federal rate
  • Omitting sales because no Form 1099-B arrived
  • Double-counting a sale imported from multiple statements
  • Ignoring capital-loss carryovers
  • Confusing a mutual-fund capital-gain distribution with selling shares
  • Assuming California gives long-term gains a lower rate

Records to keep

Retain purchase confirmations, reinvestment records, corporate-action notices, gift or inheritance documentation, improvement invoices, depreciation schedules, exchange records, sale statements, and Forms 1099-B or 1099-S. Reconcile broker statements to tax lots rather than relying only on account-level totals.

Heath Income Tax

Heath Income Tax can reconcile sales, basis, carryovers, and California adjustments and explain how an investment disposition affects the complete return.

Frequently asked questions

Is an unrealized capital gain taxable?

Usually not merely because an asset increased in value. A taxable disposition or special rule is generally required.

Do I pay tax on the full sale price?

No. Gain generally depends on amount realized minus adjusted basis.

Are all assets capital assets?

No. Inventory, accounts receivable from a business, depreciable business property, and certain other property have separate character rules.

Does reinvesting the sale proceeds avoid tax?

Usually not for securities. Reinvestment does not undo a taxable sale, although specific deferral provisions may apply to qualifying transactions.

Related terms

Official sources

The definitions and examples on this page are for informational purposes only and do not constitute tax advice. Tax laws change frequently and individual circumstances vary. Consult a qualified tax professional before making decisions based on this content.