Cost Basis
Also called: tax basis, book cost, acquisition cost
Cost basis is what you paid for an asset including fees, and it's the number your taxable gain is measured against. Getting it wrong is expensive in both directions: forgetting that reinvested dividends raise your basis means paying tax twice on the same money. When selling part of a holding you usually get to choose the accounting method — FIFO, specific identification, average cost — and specific identification lets you sell the highest-basis shares first to minimise the taxable gain.
Formula
Capital gain = Sale proceeds − Cost basis