Skip to content
← All technical concepts

Taxes · plain-English guide

Capital gains and cost basis

When you sell an asset, its cost basis helps determine the taxable gain. See how MoneyWhatIf tracks basis and models gains and losses.

2 min readWorked example included
How to read itBasis
Core relationshipbrokerage gain = withdrawal × (value − remaining basis) ÷ value

Conceptual illustration. The annual engine resolves the connected taxes and cash flows described below.

Start here

The basics

Selling an asset is not the same as earning the entire sale price. Basis is returned without being taxed again; the gain is the sale proceeds above basis. In a brokerage account, the model assumes a proportional slice of basis leaves with each withdrawal.

Illustrative numbers

A proportional brokerage sale

Account value$100,000

Remaining cost basis$60,000

$25,000 withdrawal gain$10,000

Forty percent of the account is embedded gain, so 40% of the withdrawal—$10,000—enters the long-term capital-gains calculation. The other $15,000 is modeled return of basis.

Calculation transparency

How it works in MoneyWhatIf

  1. 01

    Brokerage dividends are taxed when received and, when reinvested, increase remaining basis.

  2. 02

    Modeled gains use the long-term 0% / 15% / 20% federal ladder stacked above ordinary taxable income, plus applicable NIIT and state treatment.

  3. 03

    A primary-home sale compares gross sale price with modeled basis, applies the federal $250,000 single or $500,000 joint exclusion, and prices the remainder.

Keep in mind

Model limits

The model does not select individual tax lots or distinguish every short-term holding, wash sale, or asset-specific rate.

Capital losses are realised on every sale below basis, as a single long-term pool: it nets against the year's gains and carries forward without expiry, but it is not deducted against ordinary income. Washington's excise reads the same netted gain the federal return does. A carryforward already held from before the plan is entered once in Default settings and inherited by new plans.

Brokerage basis is proportional, which is a planning approximation rather than a tax-lot optimization.

Home basis does not capture every improvement, selling cost, depreciation-recapture, or eligibility detail of the residence exclusion.

This explanation documents the planning model. It is educational, not individualized tax, legal, Medicare, or investment advice.

Where it appears

Where to use it

See this concept in context, with a guide to each page and its controls.

The words behind it

Related financial terms

Plain-English definitions, with 2026 figures and worked examples, from the financial terms glossary.

Browse every financial term →