Cost Basis Tracker
Enter your purchase history to calculate your average cost basis, total holdings, and unrealized profit or loss at the current price.
Save 20% on Binance Trading Fees
Lifetime discount on every spot, futures, and margin trade. Use our exclusive referral code at signup.
Affiliate link — we may earn a commission at no extra cost to you.
Weighted-average cost basis
Each row contributes its dollars spent and units acquired to two running totals. The ratio is your weighted average cost. Multiplying current price by total units and subtracting cost gives the unrealized gain or loss.
- 01All purchases are recorded by the user. No automatic pulling of trade history from exchanges or brokers.
- 02Each row is a discrete buy lot. The calculator does not model partial sells (FIFO/LIFO logic) — it treats the position as a single weighted basket.
- 03Current price is entered manually. Use the price from your venue for an accurate snapshot.
- 04All amounts are in the same currency (USD by convention). Mixing currencies will produce nonsense — convert first.
- 05Fees are typically excluded unless you include them in the per-unit price you record.
- 01For tax reporting in the US, the IRS recognises specific lot identification, FIFO, and (for stocks) average cost methods. The calculator's average is a planning tool, not a tax document.
- 02Selling part of a position would change the average for the remaining lots under specific-lot methods. The tool does not handle partial sells.
- 03No transaction history persistence — entries live in memory until you copy them out. Treat the tracker as a one-time worksheet, not a portfolio system.
- 04Cost basis is in nominal dollars. To assess real performance, deflate the result by cumulative inflation since each purchase date.
How is cost basis calculated?
Cost basis is the weighted-average price you paid across all your purchases. For each buy, multiply units by price to get dollars spent; sum those dollars and divide by total units. Buys at high prices weight the average up; buys at low prices pull it down.
Is this calculator for taxes?
No. US tax reporting uses specific-lot identification, FIFO, or average cost depending on the asset class and your election. This tool is for tracking the rough state of your position, not for filing.
How does cost basis affect taxes?
When you sell, gain = sale price − cost basis. A higher cost basis means lower taxable gain. Some investors deliberately tax-loss-harvest by selling lots with the highest cost basis first (to realize losses) while keeping low-basis lots for long-term holding.
What's the difference between average cost and FIFO?
Average cost: every share has the same basis (the weighted average across all buys). FIFO (first in, first out): the oldest shares are sold first, each at their original cost. Crypto on US exchanges typically defaults to specific-lot or FIFO; mutual funds often use average cost.
Save 20% on Binance Trading Fees
Lifetime discount on every spot, futures, and margin trade. Use our exclusive referral code at signup.
Affiliate link — we may earn a commission at no extra cost to you.