Home › Templates › Crypto portfolio tracker
Crypto Portfolio Tracker Spreadsheet
A free crypto portfolio tracker spreadsheet: log buys, sells, wallet transfers and staking rewards, and it calculates each coin's quantity, average cost, cost basis, unrealized and realized profit or loss, and allocation, with a pie chart.
Use it in Google Sheets: choose File → Import → Upload in Sheets and pick the .xlsx, or upload it to Google Drive and open it with Google Sheets. No sign-up, no add-on, no exchange connection. The formulas are plain SUMIFS/IF/SUM.
| Coin | Quantity | Cost basis | Avg cost | Price | Market value | Unrealized P/L | Unrealized % | Allocation | Realized P/L |
|---|---|---|---|---|---|---|---|---|---|
| ORB | 0.7 | $31,782.25 | $45,403.21 | $58,000.00 | $40,600.00 | $8,817.75 | 27.74% | 80.04% | $3,229.25 |
| LUM | 3.09 | $6,223.82 | $2,014.18 | $2,500.00 | $7,725.00 | $1,501.18 | 24.12% | 15.23% | $582.82 |
| PXL | 3,000 | $1,201.20 | $0.4004 | $0.3500 | $1,050.00 | -$151.20 | -12.59% | 2.07% | -$201.80 |
| NOD | 150 | $1,501.50 | $10.01 | $9.00 | $1,350.00 | -$151.50 | -10.09% | 2.66% | $0.00 |
| Total | $40,708.77 | $50,725.00 | $10,016.23 | 24.60% | 100.00% | $3,610.27 |
What's inside the spreadsheet
| Tab | What you type | What it calculates |
|---|---|---|
| Start here | Nothing | Steps, the method, colour key, disclaimer |
| Transactions | Date, coin, type (dropdown: Buy, Sell, Transfer in, Transfer out, Staking reward), quantity, price in USD, fee in USD, exchange/wallet, note. 500 rows. | Quantity in/out, cost added, average cost before each sell, cost removed, proceeds, realized P/L, running holding, and a Check column that flags problems |
| Holdings | Each coin once, its current price and the price date. 30 coins. | Net quantity, cost basis, average cost, market value, unrealized P/L and %, allocation %, realized P/L, staking rewards, fees paid |
| Dashboard | Nothing | Portfolio totals, total P/L, flagged rows, allocation pie chart |
| Example Transactions / Holdings / Dashboard | Already filled | A worked example with 4 fictional coins and 13 transactions |
How to use it
- On Holdings, type each coin you own once in column A. Use the same spelling everywhere (for example
BTC, notBitcoinin one place andBTCin another). - On Transactions, add one row per transaction, oldest first. Quantity is always positive; the Type dropdown sets the direction.
- Type the price per coin and the fee in USD. If a fee was charged in a coin, convert it to USD at the time.
- Moving coins between your own wallets: add a Transfer out row and a Transfer in row right after it. The quantity difference is the network fee.
- A swap (coin A for coin B) is two rows: a Sell of A and a Buy of B at the USD value of the trade.
- On Holdings, type today's price for each coin and the date in B3. Then read the totals and chart on Dashboard.
- Fix any row where the Check column does not say
OK.
How each transaction type is handled
| Type | Quantity | Cost basis | Realized P/L |
|---|---|---|---|
| Buy | + quantity | + quantity × price + fee | None |
| Sell | − quantity | − quantity × average cost before the sell | (quantity × price − fee) − cost removed |
| Transfer out / Transfer in | − / + quantity | Unchanged (your own wallets) | None |
| Staking reward | + quantity | + quantity × price on the day received | None (tracked as reward value) |
Coins that leave you for good (spent, gifted, paid as a fee for goods) should be logged as a Sell at the market price, so their cost leaves the holding. Coins you held before you started tracking go in as a Buy with the original date, price and fee.
The formulas, explained
Exact formulas from the file. Transactions data is in rows 5–504: A = date, B = coin, C = type, D = quantity, E = price, F = fee. Row 12 is shown because it is a sell in the example.
| Field | Formula |
|---|---|
| Qty in (I) | =IF(OR(C12="Buy",C12="Transfer in",C12="Staking reward"),N(D12),0) |
| Qty out (J) | =IF(OR(C12="Sell",C12="Transfer out"),N(D12),0) |
| Cost added (K) | =IF(C12="Buy",N(D12)*N(E12)+N(F12),IF(C12="Staking reward",N(D12)*N(E12),0)) |
| Average cost before the sell (L) | =IF(C12="Sell",IF((SUMIFS(I$4:I11,B$4:B11,B12)-SUMIFS(J$4:J11,B$4:B11,B12))>0,(SUMIFS(K$4:K11,B$4:B11,B12)-SUMIFS(M$4:M11,B$4:B11,B12))/(SUMIFS(I$4:I11,B$4:B11,B12)-SUMIFS(J$4:J11,B$4:B11,B12)),0),"")(cost still held ÷ quantity still held, counting only the rows above) |
| Cost removed (M) | =IF(C12="Sell",N(D12)*L12,0) |
| Proceeds (N) | =IF(C12="Sell",N(D12)*N(E12)-N(F12),0) |
| Realized P/L (O) | =IF(C12="Sell",N12-M12,0) |
| Holdings: net quantity (C5) | =IF(A5="","",SUMIFS(Transactions!$I$5:$I$504,Transactions!$B$5:$B$504,A5)-SUMIFS(Transactions!$J$5:$J$504,Transactions!$B$5:$B$504,A5)) |
| Holdings: cost basis (D5) | Same SUMIFS on K (cost added) minus M (cost removed) |
| Average cost (E5) | =IF(A5="","",IF(C5>0,D5/C5,"")) |
| Market value (F5) | =IF(A5="","",C5*N(B5)) |
| Unrealized P/L and % (G5, H5) | =IF(A5="","",F5-D5) and =IF(A5="","",IF(D5>0,G5/D5,"")) |
| Allocation (I5) | =IF(OR(A5="",$F$35<=0),"",F5/$F$35) (F35 = total market value) |
The ranges in column L start at the header row (row 4) and stop one row above the current row. SUMIFS ignores the header text, so the first data row works too. Because the average uses only earlier rows, row order matters: keep transactions oldest first.
Average cost vs the tax rules
The template uses one average cost per coin across all your wallets. It is simple and stable: buys change the average, sells do not. Tax rules for working out a gain can be different:
- US: the IRS FAQ on virtual currency transactions says basis is "the amount you spent to acquire the virtual currency, including fees, commissions and other acquisition costs in U.S. dollars." You "may choose which units of virtual currency are deemed to be sold" if you can specifically identify them. If you do not, "the units are deemed to have been sold, exchanged, or otherwise disposed of in chronological order beginning with the earliest unit of the virtual currency you purchased or acquired; that is, on a first in, first out (FIFO) basis." The page also states: "These FAQs generally apply to transactions involving digital assets completed before Jan. 1, 2025." From 2025, basis is tracked per wallet or account; Revenue Procedure 2024-28 provides a safe harbor "to allocate unused basis of digital assets to digital assets held within each wallet or account of the taxpayer as of January 1, 2025."
- UK: HMRC's Cryptoassets Manual, CRYPTO22200, says "Each type of token will need its own pool" and "if a person owns bitcoin, ether and litecoin they would have three pools and each one would have its own ‘pooled allowable cost’ associated with it.". The pool is applied after the same-day rule and the 30-day rule: "If an individual disposes of tokens and then acquires, in the same capacity, tokens of the same type within the next 30 days", the new tokens are matched to the earlier disposal instead of going into the pool.
So the realized P/L in this sheet is a tracking figure. It can differ from the gain on a tax return: US filers use FIFO or specific identification per wallet, and UK filers apply same-day and 30-day matching before the pool. Other countries have their own rules. Check them, or ask a tax professional, before filing.
Where the prices come from
You type them. Each coin has one current price cell on Holdings and one price date (B3), so you always know how old the numbers are. Use the same source and time of day each time you update.
Google's GOOGLEFINANCE help page describes the function as one that "Fetches current or historical securities information from Google Finance" and does not document cryptocurrency symbols, so the template does not depend on it. Third-party add-ons and API imports exist, but they need setup and often an account or key.
Worked example from the sample data
Average cost after two buys: ORB
Buy 0.5 ORB at $40,000 with a $20 fee (cost $20,020.00), then 0.3 ORB at $50,000 with a $15 fee (cost $15,015.00). Holding 0.8 ORB with a cost of $35,035.00, so the average cost is $43,793.75.
A partial sell: ORB
Sell 0.2 ORB at $60,000 with a $12 fee. Proceeds are 0.2 × $60,000 − $12 = $11,988.00. Cost removed is 0.2 × $43,793.75 = $8,758.75. Realized P/L = $11,988.00 − $8,758.75 = $3,229.25. The average cost of the remaining 0.6 ORB does not change. A later buy of 0.1 ORB at $55,000 (+$6 fee) lifts it to $45,403.21 on 0.7 ORB.
A loss: PXL
5,000 PXL bought for $2,002.00 (average $0.4004). Selling 2,000 at $0.30 with a $1 fee gives $599.00 against a cost of $800.80: realized P/L -$201.80.
Transfer and staking: LUM
4 LUM bought for $8,008.00, then moved to a wallet: Transfer out 4, Transfer in 3.99. The 0.01 LUM network fee lowers the quantity but not the cost, so the average rises. Two staking rewards of 0.05 LUM at $2,400 and $2,200 add $230.00 of cost. Before the sale of 1 LUM the holding is 4.09 LUM costing $8,238.00, an average of $2,014.18. Selling at $2,600 with a $3 fee gives a realized P/L of $582.82.
Portfolio totals
At the example prices the coins still held cost $40,708.77 and are worth $50,725.00: unrealized P/L $10,016.23 (24.60%). Realized P/L from the three sells is $3,610.27, so total P/L is $13,626.50. ORB is 80.04% of the portfolio by market value. Fees on buys and sells add up to $68.50.
| Date | Coin | Type | Qty | Price | Fee | Exchange / wallet | Avg cost before | Realized P/L | Holding after |
|---|---|---|---|---|---|---|---|---|---|
| 2026-01-05 | ORB | Buy | 0.5 | $40,000.00 | $20.00 | Exchange A | 0.5 | ||
| 2026-01-05 | LUM | Buy | 4 | $2,000.00 | $8.00 | Exchange A | 4 | ||
| 2026-02-10 | ORB | Buy | 0.3 | $50,000.00 | $15.00 | Exchange A | 0.8 | ||
| 2026-02-12 | PXL | Buy | 5,000 | $0.4000 | $2.00 | Exchange B | 5,000 | ||
| 2026-03-01 | LUM | Transfer out | 4 | Exchange A | 0 | ||||
| 2026-03-01 | LUM | Transfer in | 3.99 | Wallet 1 | 3.99 | ||||
| 2026-04-15 | LUM | Staking reward | 0.05 | $2,400.00 | Wallet 1 | 4.04 | |||
| 2026-05-20 | ORB | Sell | 0.2 | $60,000.00 | $12.00 | Exchange A | $43,793.75 | $3,229.25 | 0.6 |
| 2026-06-03 | PXL | Sell | 2,000 | $0.3000 | $1.00 | Exchange B | $0.4004 | -$201.80 | 3,000 |
| 2026-07-15 | LUM | Staking reward | 0.05 | $2,200.00 | Wallet 1 | 4.09 | |||
| 2026-08-08 | ORB | Buy | 0.1 | $55,000.00 | $6.00 | Exchange A | 0.7 | ||
| 2026-09-01 | LUM | Sell | 1 | $2,600.00 | $3.00 | Wallet 1 | $2,014.18 | $582.82 | 3.09 |
| 2026-10-01 | NOD | Buy | 150 | $10.00 | $1.50 | Exchange B | 150 |
Common mistakes
- Logging only one side of a transfer. A lone Transfer out makes coins disappear. Add the matching Transfer in on the next row.
- Rows out of date order. The average cost at each sell uses only the rows above it. Sort by date before you trust the realized P/L.
- Typing a negative quantity for a sell. Quantities are always positive; the Type column sets the direction.
- Different spellings for one coin.
ETHandethmatch in SUMIFS, butETHandEtherdo not. The Check column flags coins missing from Holdings. - Forgetting fees. Buy fees raise your cost; sell fees lower your proceeds. Leaving them out overstates profit.
- Stale prices. Market value is only as fresh as the prices you typed. Update the price date when you update prices.
- Treating the realized P/L as your tax figure. See the section on tax rules above.
FAQ
How do I track my crypto portfolio in a spreadsheet?
Log every transaction on one row: date, coin, type (buy, sell, transfer, staking reward), quantity, USD price and fee. Then total each coin with SUMIFS to get quantity held and cost basis, type a current price, and calculate market value, unrealized P/L and allocation. The free template on this page does all of this with plain formulas.
How do you calculate cost basis for crypto?
Add up what you paid, including fees. The IRS virtual currency FAQ says basis is the amount you spent to acquire the virtual currency, including fees, commissions and other acquisition costs in U.S. dollars. When you sell part of a holding, the method (average cost, FIFO or specific identification) decides how much of that cost goes with the coins sold.
Can I use average cost for crypto taxes?
It depends on the country. In the UK, HMRC pools each token type in a section 104 pool, which works like an average cost, but same-day and 30-day matching rules come first. In the US, the IRS FAQ says units are treated as sold first in, first out (FIFO) unless you specifically identify them. This template uses average cost for tracking only.
Is moving crypto between my own wallets taxable?
Under the IRS FAQ, a transfer from a wallet, address or account belonging to you to another one that also belongs to you is a non-taxable event. The IRS digital assets page lists paying a transfer fee with digital assets among the disposals that mean answering Yes to the digital assets question on the return, so the network fee can still matter. Other countries have their own rules.
Are staking rewards taxable income?
In the US, IRS Revenue Ruling 2023-14 holds that the fair market value of staking rewards is included in gross income in the year you gain dominion and control over them. The template records each reward at the USD price you enter for the day it was received.
Can Google Sheets pull crypto prices automatically?
Not reliably with built-in tools. Google's GOOGLEFINANCE help page describes it as fetching securities information from Google Finance and does not document cryptocurrency symbols. Add-ons and API imports exist but need setup or keys. This template uses a typed price column and a price date, so it works offline in Excel and Sheets.
Related tools and templates
- Crypto profit calculatorProfit on a single trade
- Capital gains tax calculatorEstimate tax on a sale
- DCA calculatorRegular buys over time
- Average price calculatorAverage cost across buys
- Leverage P&L calculatorMargin and liquidation maths
- Stock portfolio trackerTrades, cost basis, P/L, allocation
- Net worth trackerAssets minus liabilities, monthly
- All templatesFree spreadsheets
Educational template only, not financial, tax or investment advice. Example data is fictional: coins ORB, LUM, PXL and NOD, their prices and the exchanges are made up and do not refer to real assets. Crypto prices can be very volatile. Quotes from the IRS, HMRC and Google were retrieved on 25 October 2026.