Portfolio Management9 min readUpdated Mar 2026

Cost Basis

The original value of an investment including purchase price and associated costs (commissions, fees), used to calculate capital gains or losses for tax purposes.

See Cost Basis in real trade signals

Tradewink uses cost basis as part of its AI signal pipeline. Get signals with full analysis — free to start.

Start Free

Explained Simply

Cost basis determines your taxable gain or loss when you sell. If your cost basis in TSLA is $200/share and you sell at $250, your capital gain is $50/share.

Calculation methods:

  • FIFO (First In, First Out): sells earliest purchased shares first. Default for most brokers.
  • LIFO (Last In, First Out): sells most recently purchased shares first.
  • Specific identification: you choose which lot to sell. Best tax control.
  • Average cost: total cost / total shares. Common for mutual funds.

Adjustments: cost basis is adjusted for stock splits, reinvested dividends, wash-sale disallowed losses (added back to basis), and return of capital distributions.

How to Calculate Cost Basis for Stocks

The basic cost basis formula is straightforward: purchase price per share multiplied by the number of shares, plus any transaction costs.

Single purchase: If you buy 100 shares of AAPL at $180 with a $0.50 commission, your cost basis is (100 x $180) + $0.50 = $18,000.50, or $180.005 per share.

Multiple purchases (scaling in): If you buy 50 shares at $180 and later buy 50 more at $195, your total cost basis is (50 x $180) + (50 x $195) = $18,750 total, or $187.50 per share average. However, the per-share average only applies if you use the average cost method. Under FIFO, the first 50 shares have a $180 basis and the second 50 have a $195 basis — and the method you choose affects your tax bill.

Dollar-cost averaging: If you invest $500 per month in an index fund, each purchase creates a separate tax lot with its own cost basis. After 12 months, you have 12 lots at different prices. Your broker tracks each one.

Fractional shares: Modern brokers support fractional share purchases. If you buy $100 of a $250 stock, you own 0.4 shares with a $250/share cost basis. The math is the same — total invested divided by shares owned.

FIFO vs LIFO vs Specific Identification

The cost basis method you choose determines which shares you are considered to have sold, which directly affects your tax bill.

FIFO (First In, First Out): The default method at most brokers. When you sell, the earliest-purchased shares are sold first. In a rising market, FIFO sells your cheapest shares first, creating the largest taxable gain. In a falling market, FIFO may actually be favorable because those earliest shares might have a higher basis than recent purchases.

LIFO (Last In, First Out): Sells the most recently purchased shares first. If you have been scaling into a position during a decline, LIFO sells the highest-cost shares first, creating a smaller gain or even a loss — useful for reducing your tax bill.

Specific identification: You tell your broker exactly which lot to sell. This gives you the most control over your tax outcome. Want to minimize taxes? Sell the lot with the highest cost basis. Want to realize a loss for tax-loss harvesting? Sell the lot that is underwater. Specific identification requires you to designate the lot at the time of sale, not after the fact.

Average cost: Total cost of all shares divided by total shares owned. Only available for mutual funds and some ETFs. Simplest to calculate but offers no tax optimization flexibility.

Which method is best? For active traders, specific identification is almost always the best choice because it gives you full control over your tax outcome on every trade. For long-term investors who rarely sell, FIFO is fine because the method matters less when you hold for years.

Cost Basis Adjustments That Change Your Numbers

Your cost basis is not always what you originally paid. Several corporate actions and tax events adjust it:

Stock splits: A 4-for-1 split turns 100 shares at $400 into 400 shares at $100. Your total cost basis stays the same ($40,000), but the per-share basis drops from $400 to $100.

Reverse splits: A 1-for-10 reverse split turns 1,000 shares at $2 into 100 shares at $20. Per-share basis goes from $2 to $20. Total basis is unchanged.

Reinvested dividends: When dividends are automatically reinvested (DRIP), each reinvestment creates a new tax lot with its own basis. If you receive a $50 dividend that buys 0.25 shares at $200, that 0.25-share lot has a $200 per-share basis. Many investors forget to add reinvested dividends to their basis, leading them to pay tax twice — once on the dividend income and again on the supposed gain.

Wash sale disallowed losses: If you sell a stock at a loss and repurchase a substantially identical security within 30 days, the loss is disallowed under the wash sale rule. The disallowed loss is added to the cost basis of the replacement shares. For example, if you sell at a $500 loss and immediately rebuy, your new shares have their purchase price plus $500 added to the basis.

Return of capital distributions: Some ETFs and REITs distribute return of capital, which reduces your cost basis rather than being taxed as income. This means a larger gain when you eventually sell.

Gifted or inherited shares: Gifted shares retain the donor's cost basis. Inherited shares receive a stepped-up basis to the fair market value on the date of death — this is one of the largest tax benefits in the tax code.

Cost Basis for Options and Complex Positions

Options add complexity to cost basis calculations:

Buying options: The cost basis of a call or put is the premium paid plus commissions. If the option expires worthless, the entire cost basis becomes a capital loss. If you exercise the option, the premium paid is added to the cost basis of the shares acquired.

Exercising a call option: If you paid $3.00 per contract for a call with a $50 strike and exercise it, your cost basis in the stock is $53.00 per share (strike price plus premium). The option purchase date does not carry over — the holding period for the stock starts on the exercise date.

Selling covered calls: If a covered call expires worthless, the premium received is a short-term capital gain. If the call is exercised (shares are called away), the premium is added to the sale proceeds, increasing your effective selling price.

Assigned puts: If you sell a cash-secured put and get assigned, the premium received reduces your cost basis in the acquired shares. A $50 put sold for $2.00 that gets assigned gives you shares with a cost basis of $48.00.

Wash sale complications with options: Buying a call option on a stock within 30 days of selling that stock at a loss can trigger a wash sale, making options-heavy traders particularly vulnerable to this rule.

Common Cost Basis Mistakes

Forgetting reinvested dividends: The most common mistake. If you invested $10,000 in a fund 20 years ago and reinvested $5,000 in dividends, your cost basis is $15,000, not $10,000. Without tracking this, you would overpay capital gains tax by the tax rate on that $5,000.

Not choosing specific identification: Most brokers default to FIFO. If you never change this, you lose the ability to optimize which lots you sell for tax purposes. Set up specific lot identification with your broker before you need it.

Ignoring wash sales across accounts: The wash sale rule applies across all your accounts, including IRAs and your spouse's accounts. Selling at a loss in your taxable account and buying in your IRA within 30 days triggers a wash sale — and worse, the disallowed loss cannot be added to the IRA's basis, meaning it is permanently lost.

Losing records of old purchases: If you cannot prove your cost basis, the IRS may assume it is zero, taxing your entire sale proceeds as gain. Keep records of all purchases, especially for stocks bought before brokers were required to track cost basis (pre-2011 for stocks, pre-2012 for mutual funds).

Not adjusting for corporate actions: Stock splits, mergers, and spin-offs all change cost basis. If a company you own spins off a division, your original cost basis is allocated between the two companies based on their relative market values. Failing to track this creates incorrect gain/loss calculations.

How Tradewink Manages Cost Basis

Tradewink tracks cost basis for every position using specific lot identification — the most tax-efficient method available. When the AI considers a partial exit, it evaluates which lot to sell based on the current tax situation:

Tax-optimized exits: If you have multiple lots at different prices, Tradewink can identify which lot to sell to minimize the taxable gain or maximize a harvestable loss. This is particularly valuable for day traders who frequently scale in and out of positions.

Wash sale awareness: The system tracks the 61-day wash sale window (30 days before and after a sale) and flags potential wash sale triggers before they happen. This prevents you from accidentally disallowing a loss you intended to harvest.

P&L accuracy: All trade journal entries, performance metrics, and analytics use the actual cost basis — not the average price — so your reported returns accurately reflect your real tax situation. This ties directly into the risk management framework where accurate cost tracking ensures position sizing decisions are based on real numbers.

How to Use Cost Basis

  1. 1

    Track Your Purchase Prices

    Cost basis = total amount paid for an investment including commissions. If you bought 100 shares at $50 with a $5 commission, your cost basis is $5,005 ($50.05 per share). Most brokers track this automatically, but verify accuracy.

  2. 2

    Handle Multiple Lots

    If you bought the same stock at different prices, you have multiple tax lots. 50 shares at $40 and 50 shares at $60 = two lots with different cost bases. When selling, choose which lot to sell: FIFO (first in, first out), LIFO, or specific identification.

  3. 3

    Use Specific Identification for Tax Optimization

    When selling partial positions, identify the specific lot that minimizes your tax impact. Selling the high-cost-basis lot ($60 shares) first creates a smaller taxable gain (or a larger loss for harvesting). Tell your broker which lot to sell — don't accept default FIFO if a different lot is more tax-efficient.

Frequently Asked Questions

What is cost basis in simple terms?

Cost basis is what you paid for an investment, including the purchase price and any fees. When you sell, the difference between your sale price and your cost basis determines your taxable capital gain or loss. If your cost basis is $50 and you sell at $70, you owe taxes on the $20 gain.

How do I find my cost basis if I lost my records?

Start with your broker — most brokers are required to track cost basis for securities purchased after 2011 (stocks) or 2012 (mutual funds/ETFs). For older purchases, check old brokerage statements, tax returns (Schedule D), or the company's investor relations page for historical stock split and dividend data. If all else fails, consult a tax professional.

Does cost basis matter for retirement accounts?

No. Traditional IRA and 401(k) withdrawals are taxed as ordinary income regardless of cost basis. Roth IRA withdrawals are tax-free in retirement. Cost basis only matters in taxable brokerage accounts where capital gains tax applies.

What happens to cost basis when a stock splits?

Your total cost basis stays the same, but the per-share basis is divided by the split ratio. A 4-for-1 split on 100 shares at $400/share ($40,000 total basis) becomes 400 shares at $100/share ($40,000 total basis). No taxable event occurs.

Should I use FIFO or specific identification?

Specific identification is better for active traders because it gives you control over which shares to sell for tax purposes. FIFO is the default and works fine for long-term investors who rarely sell. If you trade frequently, ask your broker to switch your default to specific identification.

How Tradewink Uses Cost Basis

Tradewink tracks cost basis for every position using specific lot identification. When the AI considers a partial exit, it can choose which lot to sell based on tax impact — selling a higher-cost lot to minimize the taxable gain.

Trading Insights Newsletter

Weekly deep-dives on strategy, signals, and market structure — written for active traders. No spam, unsubscribe anytime.

Related Terms

Learn More

See Cost Basis in real trade signals

Tradewink uses cost basis as part of its AI signal pipeline. Get daily trade ideas with full analysis — free to start.

Enter the email address where you want to receive free AI trading signals.