July 2026 · 7 min read
How to Track Average Cost Basis Across Multiple Buys
Learn how average cost basis works when you buy an asset multiple times, why it matters for P&L, and how to track it automatically for free.
Most investors don't buy an asset once and walk away. They buy in stages — a little Bitcoin in January, more after a dip in March, another tranche in June. That's smart discipline. But it creates a practical problem: what did you actually pay for what you own? That single number — your average cost basis — determines whether you're in profit or loss, and by how much.
Getting it wrong doesn't just mess up your mental model of your portfolio; it can lead to poor sell decisions and, depending on your jurisdiction, incorrect tax reporting. This article explains how average cost basis works, how it changes with each new purchase, and how to track it accurately without a spreadsheet full of formulas.
What Is Average Cost Basis?
Your cost basis is the original value of an asset for tax and accounting purposes — essentially, what you paid for it, including any fees. When you buy an asset multiple times at different prices, you need a single blended number to represent your overall entry point. That's the average cost basis.
The formula is straightforward:
Average Cost Basis = Total Amount Spent ÷ Total Units Held
So if you bought 1 ETH at $2,000 and later bought 1 ETH at $3,000, your average cost basis is ($2,000 + $3,000) ÷ 2 = $2,500 per ETH. If ETH is trading at $2,800, you're in profit even though your second purchase is technically underwater.
Why It Matters More Than Your Last Buy Price
New investors often anchor to their most recent purchase price. If they bought at $3,000 and the price is $2,800, they feel they're losing money — even if their average cost is $2,500 and they're actually up 12%. This psychological trap leads to premature selling or unnecessary panic.
Average cost basis gives you a more honest read on your position. It answers the only question that really matters: relative to everything I've spent, am I ahead or behind?
It also matters for:
- Unrealized P&L — the gain or loss on paper before you sell
- Realized P&L — what you actually lock in when you sell
- Tax reporting — in many countries, capital gains are calculated from your cost basis, not your first purchase price
- Rebalancing decisions — knowing your true entry helps you set rational sell targets
How Average Cost Basis Changes With Each Buy
Every time you add to a position, your average cost basis shifts. Here's a worked example with three buys:
| Purchase | Units | Price Per Unit | Total Spent | Running Avg Cost |
|---|---|---|---|---|
| Buy 1 | 0.5 BTC | $40,000 | $20,000 | $40,000 |
| Buy 2 | 0.5 BTC | $30,000 | $15,000 | $35,000 |
| Buy 3 | 1.0 BTC | $50,000 | $50,000 | $42,500 |
After three buys you hold 2 BTC. You've spent $85,000 in total. Your average cost basis is $85,000 ÷ 2 = $42,500 per BTC. If BTC is trading at $45,000, you're up roughly 5.9% overall — not 10% as your latest buy might suggest, and not down 10% as your middle buy might suggest.
What Happens When You Sell?
Selling reduces your holdings but doesn't necessarily change your remaining average cost basis — that depends on the accounting method your jurisdiction requires or allows:
- Average Cost Method — the most intuitive: your cost basis is always the blended average, and selling reduces units at that average
- FIFO (First In, First Out) — you're deemed to sell your oldest units first, which often means selling your cheapest units and realising a larger gain
- LIFO (Last In, First Out) — you sell your newest units first; less common and disallowed in some countries
- Specific Identification — you choose which exact units to sell, requiring detailed lot-level records
The method that's right for you depends on your tax situation. This article is educational, not tax advice — consult a qualified tax professional for guidance on which method applies to you.
The Manual Tracking Problem
If you buy an asset 20 times across two years — which is common for anyone dollar-cost averaging — tracking average cost basis manually becomes genuinely painful. A typical spreadsheet approach requires:
1. Logging every purchase with date, quantity, and price
2. Summing total spend and total units after each entry
3. Recalculating the blended average every time
4. Handling fees (which increase your cost basis) separately
5. Adjusting again after every partial sale
One typo or missed trade and your entire P&L picture is wrong. Most people either give up on precision or spend hours debugging spreadsheets.
How Automatic Tracking Works
Portfolio tools that compute average cost basis do the heavy lifting automatically. Every time you log a trade — whether that's a manual entry, a voice command, a screenshot import, or an uploaded CSV — the tool recalculates your blended average instantly.
WalletLens handles this for any asset in its database: 10,000+ crypto assets, stocks, ETFs, precious metals, real estate, and cash. When you add a new buy, your average cost basis updates in real time alongside your unrealized P&L. The key design decision that matters for privacy-conscious users: all calculations happen locally in your browser. No server ever sees your trade data.
For crypto specifically, the voice import feature is worth highlighting here. Instead of opening a spreadsheet, you can say "I bought 0.5 ETH at 3200" and the trade is logged immediately — cost basis recalculated, P&L updated, allocation chart refreshed. For frequent buyers, that removes a genuine friction point.
Fees: The Hidden Upward Pressure on Your Basis
One detail many investors miss: trading fees increase your cost basis. If you buy $1,000 of Bitcoin and pay a $10 fee, your cost basis is $1,010, not $1,000. Over dozens of trades, accumulated fees can meaningfully shift your break-even price upward.
When logging trades manually, always include the fee in your entry price or as a separate fee field if your tracker supports it. This gives you a more accurate picture of your true entry point and prevents overestimating unrealized gains.
Using Average Cost Basis to Set Smarter Sell Targets
Once you know your real average cost basis, you can set meaningful price targets. Rather than picking arbitrary round numbers, consider targets expressed as multiples of your cost basis:
- 1.25x — 25% gain, a reasonable first profit-taking level
- 1.5x — 50% gain, a meaningful milestone
- 2x — double your money, a classic target for higher-risk assets
- 3x or more — reserved for high-conviction, long-horizon positions
WalletLens includes a Sell Targets feature where you can set up to five price targets per asset, each with a progress bar showing how close the current price is to your target and the projected proceeds if you sell at that level. Anchoring those targets to your average cost basis makes them rational rather than arbitrary.
A Quick Checklist for Accurate Cost Basis Tracking
- Log every trade — missing even one purchase skews your average
- Include fees — they raise your cost basis and affect your real P&L
- Track partial sells — they reduce units and may affect your running average
- Use consistent methods — don't mix FIFO and average cost across assets
- Back up your data — a single corrupted spreadsheet can erase months of records; tools like WalletLens use a compact WLZ export code for offline backup
Conclusion
Average cost basis sounds like an accounting detail, but it's one of the most important numbers in your portfolio. It tells you where you truly stand on every position, regardless of whether you bought in once or twenty times. Getting it right means making sell decisions based on reality rather than the emotional anchor of your last purchase price.
The good news is that you don't have to maintain a complex spreadsheet to track it. With a tool that recalculates automatically on every new entry, you can focus on strategy — when to buy more, when to take profits, when to hold — rather than formula debugging. Track it consistently, include your fees, and your P&L picture will be one of the most reliable tools in your investing toolkit.
*This article is for educational purposes only and does not constitute financial or tax advice. Consult a qualified professional for guidance specific to your situation.*