How to Track Bitcoin in Excel: Step-by-Step
In this article
You can track Bitcoin in Excel without any add-ins or paid tools: build a small table with your transactions, pull the current price with a web query or a manual entry, and let formulas calculate your holdings, cost basis and profit or loss. The whole sheet takes about ten minutes to set up and updates in seconds once it is done. Nothing here connects to an exchange or touches your wallet — you are only recording numbers you already know, which is also why it is safe.
What You'll Need
- Microsoft Excel on desktop (Windows or Mac) if you want the automatic price refresh. Excel for the web and the mobile apps can open and edit the sheet but handle web queries poorly, so plan to refresh prices on a computer.
- Your transaction history: dates, amounts of Bitcoin bought or sold, and the price you paid or received. Export a CSV from your exchange if you have one; otherwise type from your records.
- An internet connection for the price lookup, or a willingness to type the current price in by hand each time.
- Optional: a free API key from a public crypto price service if you prefer a reliable feed over scraping a web page.
Step-by-Step
- Create a transactions table. On a new sheet, put headers in row 1: Date, Type, BTC Amount, Price per BTC, Total, Fee. In the Type column use only two values, Buy and Sell, so formulas can filter on them later. Enter one row per transaction, oldest first. Keep amounts positive and let the Type column carry the direction — mixing negative and positive numbers is the most common source of broken totals.
- Calculate each row's total. In E2 enter
=C2*D2and fill down. In F2 enter the fee you paid in your local currency. Add a column G called Net Cost with=IF(B2="Buy",E2+F2,E2-F2)so buys include fees and sells subtract them. This gives you a realistic cost basis rather than a rough one. - Build a summary block. Somewhere to the right or on a second sheet, add labels: Total BTC Held, Total Invested, Average Cost per BTC, Current Price, Current Value, Unrealised Profit/Loss. Leave the value cells empty for now.
- Total your Bitcoin. In the Total BTC Held cell enter
=SUMIF(B:B,"Buy",C:C)-SUMIF(B:B,"Sell",C:C). That subtracts everything you have sold from everything you have bought. - Total what you have spent. In Total Invested enter
=SUMIF(B:B,"Buy",E:E)+SUMIF(B:B,"Buy",F:F)-SUMIF(B:B,"Sell",E:E)+SUMIF(B:B,"Sell",F:F). This is your net cash out, which is the number that matters for profit and loss. - Work out your average cost. Average Cost per BTC is Total Invested divided by Total BTC Held. Guard against a divide-by-zero error with
=IFERROR(TotalInvestedCell/TotalBTCCell,0). Note that this is a simple average of your net position, not a tax-lot method — see the tips below. - Get the current price. The simplest reliable route is manual: type today's price into the Current Price cell from any exchange or price site. For automatic updates on desktop Excel, use Data > Get Data > From Web (older versions: Data > From Web), paste a URL for a page that shows the Bitcoin price in plain text, and import the table containing the price. Point your Current Price cell at that imported value. Public price APIs that return JSON can be loaded the same way with Get Data > From Web and the API URL. Labels and menu positions vary slightly by Excel version and platform.
- Finish the summary. Current Value is Total BTC Held times Current Price. Unrealised Profit/Loss is Current Value minus Total Invested. Format the money cells as currency and the BTC cells with eight decimal places so small amounts do not round to zero.
- Add a refresh routine. If you used a web query, right-click the query and choose Refresh, or use Data > Refresh All, each time you open the file. If you typed the price manually, overwrite it and everything recalculates instantly.
- Save a copy before big edits. Use File > Save As to keep a dated backup. A tracking sheet is easy to break with a stray row insertion, and a backup costs nothing.
Common Mistakes
- Mixing signs. Entering sells as negative BTC amounts while also using a Type column double-counts them. Pick one convention.
- Forgetting fees. Exchange and network fees are real cost. Without them your profit looks better than it is.
- Rounding Bitcoin to two decimals. At typical prices, 0.01 BTC is a meaningful sum; use eight decimals.
- Hard-coding the current price inside a formula. Keep it in its own cell so it is easy to update and easy to audit.
- Treating the average cost figure as a tax calculation. It is a running average for your own tracking, not a substitute for proper lot accounting or professional advice.
- Linking the sheet to an exchange account with stored credentials. There is no need, and it adds risk.
Tips
- Freeze the header row with View > Freeze Panes so labels stay visible as the list grows.
- Convert your range to a table with Insert > Table. Formulas then extend automatically when you add rows.
- Add a Notes column for the exchange name and the transaction ID. It makes reconciling against statements far quicker.
- Keep a separate column for the price in your local currency if you buy in something other than dollars, and record the exchange rate you used.
- If you want a chart, select your date and current-value columns and insert a line chart on a second sheet; keep the data sheet clean.
- Protect the formula cells with Review > Protect Sheet once the layout is settled, so a mistyped entry does not silently corrupt totals.
Troubleshooting
- The web query returns an error or an empty table. The page layout probably changed or the site blocks automated requests. Fall back to manual entry, or use a documented public API endpoint instead of a web page.
- Totals look wrong. Check the Type column for typos such as "buy " with a trailing space, and confirm every row has a value in BTC Amount and Price per BTC.
- You see #VALUE! or #DIV/0!. A text value has crept into a numeric column, or Total BTC Held is zero. Wrap divisions in IFERROR and clean the offending cell.
- Numbers show as text and will not sum. Select the column, use Data > Text to Columns and finish the wizard, or re-enter the values with the cell formatted as Number.
- The price will not refresh. Check your connection, confirm the query still points at a valid URL, and try Data > Refresh All. If it still fails, retype the price manually — the rest of the sheet does not depend on the query.
- The file is slow. Very large web queries and volatile formulas add up. Import only the single price cell you need rather than a whole page.
Frequently Asked Questions
Can Excel pull the Bitcoin price automatically?
Yes, on desktop Excel, using Data > Get Data > From Web against a page or a public API that returns the price. It is not a live ticker — you refresh it manually or when the file opens.
Does this connect to my exchange or wallet?
No. The sheet only holds numbers you type or import. It cannot move funds and does not need your login details.
Can I track other coins in the same sheet?
Yes. Add a Coin column and repeat the summary block per coin, or use SUMIFS filtered on both coin and type.
How do I handle a transfer between my own wallets?
Do not record it as a buy or sell. A move between your own wallets changes nothing about your holdings, so log it in the Notes column only, or you will distort your cost basis.
Is the average cost figure good enough for tax?
It is fine for personal tracking but tax rules differ by country and often require specific lot identification. Keep the full transaction list and check with a qualified adviser.
Will it work in Excel for the web?
You can build and edit the sheet, but web queries are limited there. Refresh prices in the desktop app and the values carry over when the file is saved online.