---
title: Cost basis — what it means and why it matters | Allocate AI
description: What you paid for an investment, including fees, or the value you were taxed on when you received it; the starting point for measuring gain or loss.
canonical: https://allocateai.io/glossary/cost-basis
site: Allocate AI — https://allocateai.io
---

# Cost basis

What you paid for an investment, including fees, or the value you were taxed on when you received it; the starting point for measuring gain or loss.

Cost basis is the number a gain or loss is measured from. For shares you bought, it is the purchase price plus any commission. For shares you received as pay, it is the value you were taxed on when you got them: the vest-date price for RSUs, the purchase-date price for ESPP shares, and the market value at exercise for NSOs. Sell for more than the basis and you have a gain; sell for less and you have a loss.

Getting basis right prevents double taxation. Say 100 RSUs vest at $80, and $8,000 is reported as wages on your W-2. Your basis is $8,000. If you sell at $85, the gain is $500, not $8,500. The problem is that brokers sometimes report a basis of $0 for stock compensation, and if you copy that onto your return you pay income tax on the $8,000 twice.

Basis also depends on which shares you sell. If you bought at $50, $70, and $90 and sell one lot, specific identification lets you choose the $90 lot to minimize the gain, or the $50 lot to maximize it for offsetting a loss. The default at most brokers is first in, first out.

The common mistakes are accepting the broker's basis without checking it against your W-2 for equity compensation, and losing track of basis on old holdings or inherited shares (which reset to the value on the date of death). Keeping the vest and purchase confirmations makes tax season far easier.

## Related terms

- [Capital gains (short-term vs long-term)](https://allocateai.io/glossary/capital-gains) — Profit from selling an investment for more than you paid; gains on assets held over a year get lower tax rates than gains on assets sold sooner.
- [RSU (restricted stock unit)](https://allocateai.io/glossary/rsu) — A promise from your employer to give you shares of company stock on a future date, as long as you are still there when that date arrives.
- [ESPP (employee stock purchase plan)](https://allocateai.io/glossary/espp) — A benefit that lets you buy your company's stock through payroll deductions at a discount, often 15% below the market price.
- [Wash sale](https://allocateai.io/glossary/wash-sale) — Selling an investment at a loss and buying the same or a nearly identical one within 30 days before or after, which disallows the loss for tax purposes.

**Plan in plain language.**

Allocate answers “can I afford this?” from your own numbers, writes the plan, and stages every change for your yes. It starts from an estimate before you link a bank.

[Get started](https://app.allocateai.io/signup)

---

Allocate AI is a budgeting and financial-planning app: link your accounts, say what you want in plain words, and it writes the plan and stages every change for your approval. Read more at https://allocateai.io or see all pages in https://allocateai.io/llms.txt.
