Capital Gains

The profit realized when a capital asset — such as stock, equity, or real estate — is sold for more than its purchase price (cost basis). Capital gains are subject to tax in the year the asset is sold.

A capital gain is the difference between what you paid for an asset (the cost basis) and what you received when you sold it, when that difference is positive. If you buy 100 shares of stock at $10 each and sell them at $25 each, you have a $1,500 capital gain ($2,500 proceeds minus $1,000 basis). Capital gains are a taxable event in the year of sale — they are reported on your tax return and subject to federal (and usually state) capital gains tax. Unrealized gains — increases in value of assets you still own — are not taxable until you sell.

The tax treatment of capital gains depends critically on how long you held the asset before selling. Assets held for one year or less are subject to short-term capital gains tax, which is taxed at the same rates as ordinary income — your regular marginal federal rate (up to 37%). Assets held for more than one year qualify for long-term capital gains rates, which are significantly lower: 0%, 15%, or 20% depending on your income, plus a 3.8% Net Investment Income Tax (NIIT) if your income exceeds certain thresholds. This distinction — short vs. long term — is one of the most practically significant tax concepts for anyone who holds equity compensation.

For employees with equity compensation — RSUs, stock options, ESPP — understanding capital gains is essential for tax planning. When RSUs vest, the shares are treated as ordinary income (taxed at your marginal rate) based on the fair market value at vesting. The vesting price becomes your cost basis. If you sell those shares later for more than the vesting price, the additional appreciation is a capital gain — short or long term depending on how long you held after vesting. If you sell immediately at vesting (a same-day sale), there's typically no capital gain at all, just the ordinary income. If you hold for more than a year after vesting, any appreciation beyond the vesting price is taxed at favorable long-term rates.

Capital losses — when you sell an asset for less than your cost basis — can offset capital gains. If you have $10,000 in capital gains and $4,000 in capital losses in the same tax year, you're taxed on net capital gains of $6,000. If your capital losses exceed your capital gains, you can deduct up to $3,000 of the net loss against ordinary income per year, carrying forward any excess losses to future years. This interplay between gains and losses is the basis for tax-loss harvesting — strategically realizing losses to offset gains and reduce your overall tax burden.

Short-Term vs. Long-Term Capital Gains

  • Short-term (held ≤ 1 year): taxed as ordinary income at your marginal federal rate — up to 37%.
  • Long-term (held > 1 year): taxed at 0%, 15%, or 20% federally, depending on your taxable income — significantly lower than ordinary income rates for most taxpayers.
  • The 0% rate applies to long-term gains for single filers with taxable income up to ~$47,025 (2024) — meaning low-income years are often ideal for realizing gains.
  • The 20% rate applies only to the highest earners (taxable income above ~$518,900 for single filers); most people pay 15%.
  • Net Investment Income Tax (NIIT): an additional 3.8% applies to investment income (including capital gains) for taxpayers with modified AGI above $200,000 (single) or $250,000 (married filing jointly).
  • State taxes: most states tax capital gains as ordinary income with no special lower rate — California, for example, taxes all capital gains at regular state income tax rates (up to 13.3%).

Capital Gains in Equity Compensation

  • RSUs: ordinary income at vesting (FMV at vest = cost basis). Capital gain/loss only applies to appreciation after vesting, calculated from vest date. Holding 1+ year after vest converts that appreciation to long-term gains.
  • NSOs (Non-Qualified Stock Options): the spread at exercise (FMV minus strike price) is ordinary income. Holding the purchased shares for 1+ year after exercise converts subsequent appreciation to long-term gains.
  • ISOs (Incentive Stock Options): no ordinary income at exercise (for regular tax purposes — though the spread may trigger AMT). Gain from exercise price to sale price is long-term capital gains if you hold the stock for 2 years after grant and 1 year after exercise (qualifying disposition).
  • ESPP: tax treatment depends on whether shares are sold in a qualifying or disqualifying disposition — the rules are complex and vary by plan; consult a tax advisor.

Calculating Cost Basis

Cost basis is what you paid for an asset, and it determines the size of your taxable gain or loss on sale. For shares purchased on the open market, basis is typically the purchase price. For RSUs, basis is the FMV at vest (the amount already included in your W-2 income). For stock options, basis is the exercise price paid plus any ordinary income recognized at exercise. If you have multiple lots of the same stock acquired at different prices, you need to track which lot you're selling — selling higher-basis shares first (specific identification) minimizes taxable gains; your broker defaults to average cost or FIFO if you don't specify. Keeping accurate basis records is your responsibility, not your broker's — errors in basis tracking often result in overpaying taxes.

Example

An engineer receives 100 RSUs that vest at $50/share. The $5,000 is included in her W-2 as ordinary income, taxed at her marginal rate. Her cost basis in the shares is $50 each. Eighteen months later, the stock is at $80/share and she sells all 100 shares. The $3,000 gain ($80 − $50 × 100 shares) is a long-term capital gain — taxed at 15% federally rather than her 32% marginal rate. If instead she had sold immediately at vesting, the proceeds would exactly equal her basis and there would be no capital gain at all.