Bitcoin cost basis,
tracked in your browser.

Log your purchases. See your weighted average cost basis, total BTCBitcoin (BTC)The ticker symbol for Bitcoin, used on exchanges and in price quotes.Full definition held, unrealized gain or loss, and break-even price. Your numbers stay on your device. Nothing is sent anywhere.

The question it answersWhat is my average cost basis and unrealized gain across all my Bitcoin buys?

Prices: uses the latest daily Bitcoin close in the site’s own data file, not a live quote; no price service is contacted. Privacy: runs in your browser. What you enter stays on your device unless you copy a share link, which puts your inputs in the link.

ADD A PURCHASE

Fills in from the latest daily close in the site's data file. A price you type is kept in this browser. Clear the field and that close returns the next time the page loads.

Data stays in your browser via localStorage. Nothing is sent to any server.

TOTAL BTC
0
TOTAL INVESTED
$0
AVG COST BASIS
$0
PORTFOLIO VALUE
$0
GAIN/LOSS
$0
PURCHASE HISTORY
Date Spent Price BTC Value
What this tool assumes
  • Average cost basis is a weighted average: total spent ÷ total BTC. It is a tracking figure, not a tax method. The IRS digital asset FAQs do not provide for average cost: for sales from 2025 on, units are matched by specific identification or, by default, first in, first out within each wallet or account[1].
  • To use specific identification, identify the units sold no later than the date and time of the sale and keep records showing which lot each unit came from. For units held at a broker, sales through 2025 can be identified in your own books and records, including by a standing order recorded there (Notice 2025-7 relief); from 2026 on, the identification or standing order must be given to the broker (IRS FAQs 82 to 88)[1].
  • Amount spent should include fees paid in dollars (IRS FAQ 56). Sales, transfers out and fees paid in BTC are not modeled.
  • The current price fills in from the latest daily close in the site's data file, the same dated price the header shows. A price you type, or one carried in a shared link, is kept and not replaced. Only a typed or shared price is saved; clearing the field hands it back to that close. With the field blank or not above $0, value and gain show n/a.
  • A purchase needs a date with a four-digit year, on or after 2009-01-03, and an amount and price above $0; otherwise nothing is added and the form says why. The source is limited to 120 characters. The purchase date starts at today's date on each visit, unless a shared link carries one.

Not financial advice. Data stored in browser localStorage only.

HOW THIS IS CALCULATED

This tool runs entirely in your browser: no data is sent to any server. The purchase log is saved in this browser's localStorage only.

For each purchase, BTC bought = amount spent ÷ BTC price at purchase. Then:

  • Total BTC = sum of BTC bought, shown to 8 decimals. Total invested = sum of amounts spent.
  • Average cost basis = total invested ÷ total BTC. This is also the break-even price.
  • Portfolio value = total BTC × current price. Gain or loss = value - total invested; gain % = gain ÷ total invested × 100, shown to one decimal (a figure that rounds to zero shows as 0.0%).

Dollar figures round to whole dollars. The current price field fills in from the latest daily close in the site's data file: $81,262, the Coin Metrics end-of-day USD price for 2026-09-19 in the site's data snapshot[2]. A price you type, or one carried in a shared link, is kept and not replaced, and only a typed or shared price is saved in this browser. Clear the field to go back to the saved daily close. If the field is blank or not above $0, value and gain show n/a instead of a result. The CSV export quotes the source field and puts an apostrophe in front of a source that starts with =, +, - or @ so spreadsheets do not run it as a formula.

Enter the amount spent including fees: IRS FAQ 56 counts the cost of transaction services in the basis of digital assets bought with cash[1]. The weighted average is a tracking figure, not a tax method. For sales from 2025 on, IRS FAQs 82 to 88 match units by specific identification or, by default, first in, first out within each wallet or account[1], so the gain on a given sale can differ from what the average implies. Sales, transfers out and fees paid in BTC are not modeled.

Each saved purchase is checked when the page loads. One that cannot be read (for example a date without a four-digit year) is left out with a notice, and a copy of the original log is kept in this browser's storage instead of being overwritten.

Verify the methodology or inspect the source code in your browser's dev tools.

Where to go from here

Read next

Bitcoin Cost Basis Methods

Three methods. Different tax. The IRS now requires per-wallet tracking starting tax year 2025.

Explore further
  • Bitcoin Taxes (US)Every Bitcoin tax scenario in one page. Buying, selling, spending, mining, gifts, inheritance, Roth IRA.
  • Bitcoin Tax-Loss HarvestingSell at a loss, claim it, rebuy the same minute. The wash sale rule does not apply.
  • Bitcoin Tax-Loss HarvestingEstimates tax savings from harvesting a Bitcoin loss and immediately rebuying at the same price, by bracket and holding period.

Sources

Bracketed numbers in the text link to these sources. Figures, rates and rules change: check each source’s date before acting on it.

  1. IRS, Frequently asked questions on digital asset transactions. Checked 2026-09-26. ↩
  2. Coin Metrics, Price. Checked 2026-09-26. ↩

Calculators are educational estimates, not financial advice. Disclosures · How pages are reviewed