loading prices...
prices by coingecko
onchain.search tools/local · 0 uploads/links/about

home / us / us-crypto-cost-basis-calculatorlocal

US Crypto Cost Basis Calculator (FIFO, LIFO, HIFO)

Work out the gain on each crypto sale by FIFO, LIFO or HIFO, split into short-term and long-term.

us-crypto-cost-basis-calculatorready · runs in this browser

Runs locally in your browser. Nothing you type is sent anywhere.

us tools · free · runs in your browser · no sign-up · no wallet

01 // about this tool

Your gain depends on which coins you say you sold. FIFO uses the oldest first, LIFO the newest, and HIFO the most expensive, which usually means the smallest gain. This matches each sale to your buys and splits the result by holding period.

02 // how to use it

  1. List the buys and sells for one token in one wallet or account.
  2. Pick a method.
  3. Press Run and compare methods.

03 // faq

Which method can I use?

FIFO applies unless you identify the specific units when you sell. LIFO and HIFO are forms of specific identification.

Why one wallet at a time?

Since 1 January 2025 the IRS needs cost basis tracked for each wallet or account separately.

04 // related tools

all 3 us tools →