> ## Documentation Index
> Fetch the complete documentation index at: https://guides.koinx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cost Basis & Accounting Methods for Crypto Tax

> Understand FIFO, LIFO, HIFO, and Average Cost for crypto tax. Learn how your accounting method affects capital gains calculations across all jurisdictions

"Cost basis" is probably the most important concept in crypto tax that nobody explains properly. It is the reason KoinX asks for your historical data. It is why your gains might look different on KoinX versus your exchange. And it is the foundation of every tax calculation.

***

## What Is Cost Basis?

Cost basis is simply **what you paid for your crypto**. When you sell, your taxable gain is:

```text theme={null}
Gain = Sale Price - Cost Basis
```

Simple in theory. But here is where it gets complicated.

**Scenario:** You bought BTC at different times:

* January: 0.5 BTC at Rs. 15,00,000 (cost: Rs. 7,50,000)
* March: 0.3 BTC at Rs. 18,00,000 (cost: Rs. 5,40,000)
* May: 0.2 BTC at Rs. 20,00,000 (cost: Rs. 4,00,000)

Total: 1 BTC, total cost Rs. 16,90,000

Now you sell **0.4 BTC**. Which cost basis applies? The January purchase? March? An average?

This is where **accounting methods** come in.

***

## Accounting Methods Explained

KoinX supports four accounting methods. Each determines which purchase lot gets matched to your sale.

### FIFO (First-In, First-Out)

**The default in KoinX and most jurisdictions.**

The oldest coins you bought are considered sold first.

**Using our example:** Selling 0.4 BTC using FIFO:

* 0.4 BTC from the January lot @ Rs. 15,00,000/BTC
* Cost basis = Rs. 7,50,000 x (0.4/0.5) = **Rs. 6,00,000**

**When FIFO works in your favour:**

* When older purchases were cheaper (higher basis reduces your gain)
* Most straightforward and widely accepted globally

**When FIFO is less ideal:**

* When recent purchases were more expensive and older lots were cheap, FIFO produces higher taxable gains

***

### LIFO (Last-In, First-Out)

The most recently purchased coins are considered sold first.

**Using our example:** Selling 0.4 BTC using LIFO:

* 0.2 BTC from May @ Rs. 20,00,000 = Rs. 4,00,000
* 0.2 BTC from March @ Rs. 18,00,000 = Rs. 3,60,000
* Total cost basis: **Rs. 7,60,000**

**When LIFO works in your favour:**

* When recent purchases were more expensive
* Can reduce gains in a falling market

**When LIFO is less ideal:**

* When older purchases were expensive, you may miss using those higher cost lots

***

### HIFO (Highest-In, First-Out)

The most expensive purchase lots are sold first, regardless of when they were acquired.

**Using our example:** Selling 0.4 BTC using HIFO:

* 0.2 BTC from May @ Rs. 20,00,000 = Rs. 4,00,000 (highest cost)
* 0.2 BTC from March @ Rs. 18,00,000 = Rs. 3,60,000 (next highest)
* Total cost basis: **Rs. 7,60,000**

**When HIFO works in your favour:**

* Minimises taxable gains in most scenarios
* Useful when purchase prices vary significantly

**When HIFO is less ideal:**

* Not accepted in every jurisdiction
* Requires accurate, complete transaction records

***

### Average Cost

All purchase costs are averaged together. Every unit of the asset is treated as having the same cost basis.

**Using our example:**

Total cost = Rs. 16,90,000 for 1 BTC

Average cost per BTC = Rs. 16,90,000

Selling 0.4 BTC: Cost basis = Rs. 16,90,000 x 0.4 = **Rs. 6,76,000**

**When Average Cost works in your favour:**

* Simpler record-keeping
* Required or preferred in some jurisdictions

**When Average Cost is less ideal:**

* Less flexibility for tax optimisation
* Cannot selectively use higher-cost lots

***

## Comparing Methods: Same Sale, Different Tax

Selling 0.4 BTC for Rs. 9,00,000:

| Method       | Cost Basis   | Gain         | Tax (30% + 4% cess = 31.2%) |
| ------------ | ------------ | ------------ | --------------------------- |
| FIFO         | Rs. 6,00,000 | Rs. 3,00,000 | Rs. 93,600                  |
| LIFO         | Rs. 7,60,000 | Rs. 1,40,000 | Rs. 43,680                  |
| HIFO         | Rs. 7,60,000 | Rs. 1,40,000 | Rs. 43,680                  |
| Average Cost | Rs. 6,76,000 | Rs. 2,24,000 | Rs. 69,888                  |

Same transaction. Tax ranging from Rs. 43,680 to Rs. 93,600. The method matters.

<Note>
  HIFO often minimises tax, but FIFO is the default and most widely accepted. Check what is permitted in your jurisdiction before switching.
</Note>

***

## Which Method Should You Use?

| Situation                           | Worth Considering |
| ----------------------------------- | ----------------- |
| Want simplicity and wide acceptance | FIFO              |
| Bought recently at high prices      | LIFO or HIFO      |
| Want to minimise taxable gains      | HIFO              |
| Jurisdiction requires average cost  | Average Cost      |
| Unsure                              | FIFO              |

<Tip>
  You can test different methods in KoinX by switching the setting and regenerating reports before committing to one.
</Tip>

***

## Is FIFO Mandatory for India?

There is no explicit rule mandating FIFO for crypto in India. However, FIFO is the most commonly used approach, widely accepted by tax professionals, and the default method in KoinX.

Unless advised otherwise by your CA or tax advisor, FIFO is generally considered the safest choice.

***

## Is It Legal to Change Accounting Methods?

Generally, you can choose any accounting method that is accepted in your jurisdiction.

However:

* Some jurisdictions mandate specific methods
* Maintaining consistency across years is strongly recommended
* Switching methods frequently complicates record-keeping

<Warning>
  Switching accounting methods after filing returns can create discrepancies in cost basis calculations. If you have already filed for a year, do not change the method for that year.
</Warning>

***

## Can I Use Different Methods in Different Years?

Technically possible in some cases, but not recommended.

Cost basis carries forward across years. Switching methods can create mismatches between years and makes records harder to reconcile. Best practice: choose one method and stick with it.

***

## How to Change Your Accounting Method in KoinX

<Steps>
  <Step title="Go to Tax Settings">
    Click **Tax Settings** in the left sidebar.
  </Step>

  <Step title="Find Accounting Method">
    Look for the **Accounting Method** or **Calculation Method** option. You will see FIFO, LIFO, HIFO, and Average Cost.

    <Frame>
      <img title="Image1 6" className="hidden dark:block" src="https://mintcdn.com/koinx-e9affad9/WxTEpR4RePSL7MI6/images/image-7.png?fit=max&auto=format&n=WxTEpR4RePSL7MI6&q=85&s=765ce67601f652ae82bb3a23188e6b3f" alt="Image1 6" width="3016" height="1408" data-path="images/image-7.png" />

      <img title="Image1 6" className="dark:hidden" src="https://mintcdn.com/koinx-e9affad9/WxTEpR4RePSL7MI6/images/image1-6.png?fit=max&auto=format&n=WxTEpR4RePSL7MI6&q=85&s=1f6f66f9b3e84218c6612c34c124b227" alt="Image1 6" width="3020" height="1406" data-path="images/image1-6.png" />
    </Frame>
  </Step>

  <Step title="Select your method">
    Choose your preferred method.
  </Step>

  <Step title="Save and regenerate reports">
    Save the new setting, then regenerate your tax reports to apply the updated calculations.
  </Step>
</Steps>

### What happens when you change method

1. All transactions are recalculated
2. Different purchase lots are matched to sales
3. Cost basis and gains change
4. Newly generated reports reflect the updated method

Previously downloaded reports will not change.

***

## Why KoinX Needs Your Historical Data

This is the most common source of confusion: "I am filing for FY 2024-25. Why does KoinX want my 2022 transactions?"

**The answer: cost basis carry-forward.**

If you bought crypto in 2022 and still hold it, that 2022 purchase price is your cost basis. When you sell in 2025, KoinX needs the original cost to calculate your gain correctly.

**Without historical data:**

* KoinX sees a sale but no corresponding purchase
* Cost basis defaults to zero
* Your gain is overstated or shows an error
* You see "Insufficient Quantity" warnings

**With complete historical data:**

* Every sale is matched to its purchase
* Accurate cost basis means accurate gains
* Clean reports with no warnings

<Tip>
  Import data from when you first started trading crypto, not just the year you are currently filing for.
</Tip>

***

## Cost Basis for Different Transaction Types

| Transaction Type   | Cost Basis                                                                   |
| ------------------ | ---------------------------------------------------------------------------- |
| Regular purchase   | Purchase price paid                                                          |
| Airdrops / Rewards | Fair market value at time of receipt (if treated as income)                  |
| Hard forks         | Generally zero or fair market value at fork date (grey area in India)        |
| Gifts received     | Donor's original cost basis if known, otherwise fair market value at receipt |

***

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="How do I change my accounting method?">
    Go to Tax Settings, select the preferred method in the Accounting Method dropdown, save the settings, and regenerate reports. The new method will apply to all newly generated reports.
  </Accordion>

  <Accordion title="Is it legal to change accounting methods?">
    In many jurisdictions you can choose any accepted method. However, maintaining consistency across tax years is strongly recommended. Switching methods can complicate cost basis tracking across years.
  </Accordion>

  <Accordion title="Last year I used FIFO. Can I use LIFO this year?">
    It may be possible depending on your jurisdiction, but switching methods complicates cost basis carry-forward. The previous year's closing lots become the current year's opening lots. Consistency is generally the safer approach. Check with your CA before switching.
  </Accordion>

  <Accordion title="What happens if I change accounting method?">
    KoinX recalculates all transactions with the new method. Cost basis, gains, and reports all update accordingly. Previously downloaded reports remain unchanged, but any newly generated reports will reflect the updated method.
  </Accordion>

  <Accordion title="Will changing accounting method affect past tax reports?">
    Previously downloaded reports remain unchanged. Any newly generated reports will reflect the updated method. If you have already filed a return using one method, avoid changing it for that financial year.
  </Accordion>

  <Accordion title="Can I change accounting method after filing my ITR?">
    For a year you have already filed: not advisable. The filed return should match your reports. For future years: possible, but consistency is strongly recommended. Discuss with your CA before making any changes.
  </Accordion>

  <Accordion title="Does cost basis get updated if I add historical data later?">
    Yes. If you re-sync exchanges and new historical transactions are pulled in, KoinX recalculates cost basis with the additional data. More complete data means more accurate calculations, but it also means previously generated reports may show different figures compared to freshly generated ones.
  </Accordion>

  <Accordion title="Why does my cost basis show as zero for some transactions?">
    This usually means KoinX does not have the original purchase data. To fix it: import older transactions from your exchanges, add manual entries for purchases you cannot import, or check whether the asset was received as an airdrop or reward (cost basis would be fair market value at receipt if treated as income).

    [Step-by-step guide to fixing zero cost basis](/guides/transactions/fixing-transaction-issues)

    [How this appears as a warning in your Transactions page](/guides/transactions/transactions-warnings-and-errors)
  </Accordion>

  <Accordion title="What if I bought the same coin on multiple exchanges?">
    KoinX calculates cost basis at the wallet or integration level, not across all exchanges combined. Purchases and sales are matched within the same wallet or exchange integration. For example, if you bought 1 BTC on Binance and 1 BTC on Bybit and sell the BTC from Bybit, the cost basis used will be from your Bybit purchases.
  </Accordion>
</AccordionGroup>

***

## What's Next?

* [Transaction Settings & Income Classification](/guides/tax-settings/transaction-settings-income-classification)
* [Finding Tax Settings](/guides/tax-settings/managing-country-currency-and-time-zone-settings)
