CryptaTax
EN
EnglishENDeutschDEEspañolESFrançaisFRItalianoIT日本語JA한국어KONederlandsNLPolskiPLPortuguêsPT
Sign In Get Started Free

Computing Crypto Capital Gains in Brazil with Average Cost

CryptaTax Editorial · · 9 min read
TAX REPORTING Computing Crypto Capital Gains inBrazil with Average Cost

Reference pages define the terms. This one walks the calculation, because the gap between knowing what average cost means and being able to produce a defensible number for a month of trading is where most people get stuck.

The quantity you are computing

You dispose of crypto when you sell it for reais, exchange it for another token, or use it to pay for goods or services. The taxable amount is broadly the difference between what you receive on the disposal and your cost, meaning what you paid to acquire the asset including associated costs.

Everything below is about the second term, because the first is usually observable and the second has to be constructed.

Building the average cost

Average cost answers a question that arises the moment you buy the same asset twice: which units did you sell? Rather than picking, you hold one blended cost per unit and recompute it as you acquire.

The method in three rules:

  1. On a purchase, add the amount paid, including associated costs, to your total cost, and add the units to your total quantity. The new average is total cost divided by total quantity.
  2. On a disposal, the cost of what you disposed of is units disposed multiplied by the current average. The gain is what you received less that amount.
  3. After a disposal, reduce total quantity by the units sold and reduce total cost by the same units multiplied by the average. The average itself does not change.

That third rule is the one people implement wrongly. A disposal removes units at the average; it does not move the average. Only acquisitions move it.

Worked shape

Buy 1 unit at a price, then buy 1 more at a different price: your average is the midpoint of the two, and your total cost is the sum. Sell 0.5 units: the cost of that half is 0.5 multiplied by the average, your gain is proceeds less that figure, and your remaining 1.5 units still carry the same average. Buy again at a third price and the average moves for the first time since the sale.

Follow those steps in order and the arithmetic is unambiguous. The difficulty is never the formula; it is having every acquisition in the right order.

Crypto to crypto is where it gets interesting

Brazil treats crypto to crypto exchanges as taxable events rather than tax free swaps, so a single trade touches both sides of your records at once:

  • It is a disposal of the token you gave up, at its value in reais at that moment, producing a gain against that token's average cost.
  • It is an acquisition of the token you received, at that same value in reais, which enters the receiving token's average cost.

Recording only one side is the most common error in Brazilian crypto records, and it corrupts everything after it: the disposed token's quantity never reduces, and the received token acquires a zero cost that turns its eventual sale entirely into gain.

The conversion problem

Your computation is in reais, but a great deal of crypto trading is priced in dollars or in a stablecoin. Every leg denominated in something other than reais needs conversion, at the moment of the transaction rather than at month end.

The trap is subtle: converting the gain at one rate is not the same as converting each leg at its own rate. The acquisition happened on one day and the disposal on another, and both the crypto price and the currency rate moved in between. Convert each leg, then compute the gain in reais.

Fix one rate source and one convention, document it, and use it everywhere. An inconsistent convention produces a number you cannot reproduce next year.

What to keep

  • Every acquisition in chronological order, with associated costs included.
  • Every disposal, including both sides of every crypto to crypto trade.
  • The running average cost and running quantity per asset, so any month can be recomputed.
  • Transfers between your own wallets identified as transfers, since they are not disposals and must not touch the average.
  • Your currency conversion source and convention.

Consult the verified summary table on our Brazil guide for the limits, frequencies and deadlines that apply to you, and confirm current rules with the Receita Federal or a qualified Brazilian accountant.

Our capital gains reference defines the concepts, and Brazilian crypto tax covers the reporting obligations that sit alongside them.

General information, not tax advice. Rules change and depend on your circumstances. Confirm the current position with the relevant tax authority or a qualified tax professional.

Practical Steps to Organize Your Crypto Records

Before you attempt to compute your capital gains, you need a reliable record of every transaction. Start by gathering all your data from exchanges, wallets, and any other platforms you have used. This includes purchase receipts, sale confirmations, and records of any transfers between your own wallets. The goal is to create a single, chronological list of every event that affects your crypto holdings. For each transaction, note the date, the asset involved, the quantity, the value in your local currency at the time, and any fees or other costs. If you have used multiple platforms, you will need to consolidate the data into one place, such as a spreadsheet or a dedicated software tool. This step is foundational because any error here will propagate through your calculations. Take your time to ensure that every transaction is captured, and that the details are accurate. If you find gaps, such as missing records from an exchange that no longer operates, you may need to reconstruct the data from other sources, such as bank statements or email confirmations. Document any assumptions you make during this process, as you will need to explain them if your records are ever reviewed.

Common Pitfalls and How to Avoid Them

Once you have a complete list of transactions, the next step is to identify any unanswered questions. For example, you might be unsure whether a particular transfer between your own wallets should be treated as a disposal or a non-taxable transfer. Or you might have received crypto as payment for goods or services, and you need to determine its fair market value at the time of receipt. Another common question is how to handle fees that are paid in crypto, such as network fees for sending tokens. These fees might be considered part of the cost of the transaction, or they might be treated as a separate disposal. The answers to these questions can significantly affect your gain or loss, so it is important to resolve them before you finalize your calculations. If you are uncertain about the correct treatment, you should consult the official guidance from your tax authority or seek advice from a qualified tax professional. Do not guess, because an incorrect assumption could lead to an underpayment or overpayment of tax. Write down each question and the answer you decide to use, along with the reasoning behind it. This documentation will be invaluable if you need to defend your figures later.

When to Seek Professional Help

Reconciling your records with external sources is a critical step that many people overlook. After you have compiled your transaction list and computed your gains, you should compare your figures with the statements from your exchanges and wallets. For example, the total quantity of each asset in your records should match the balance shown on your wallet or exchange account. If there is a discrepancy, you need to find the cause. It could be a missing transaction, a duplicate entry, or an error in the quantity or price. Similarly, you should check that the total proceeds from sales match the amounts that were actually deposited into your bank account, after accounting for any fees. This reconciliation process helps to catch mistakes that could otherwise go unnoticed. It also provides an audit trail that demonstrates the accuracy of your calculations. If you find a difference, trace it back to the source and correct it. Do not simply adjust your records to match the external balance without understanding why the difference exists. In some cases, the discrepancy might be due to a legitimate reason, such as a transfer that is still pending or a fee that was charged in a different currency. Document your findings and the resolution for each discrepancy.

Documenting Your Methodology

When you compute your gains, you will need to make certain assumptions, such as the exchange rate to use for converting foreign currency transactions, or the method for valuing assets received as income. It is essential to document these assumptions clearly. For example, if you use a specific exchange rate source, note the date and time of the rate, and the URL or reference for the rate. If you use a particular valuation method, such as the average price on the day of receipt, explain why you chose that method. This documentation serves two purposes: it helps you reproduce your calculations in the future, and it provides evidence to a tax authority if your return is questioned. Keep all your records in a safe place, preferably in both digital and paper form. You might also want to create a summary document that lists all your assumptions and the rationale behind them. This is especially important if you are using a professional to prepare your tax return, as they will need to understand your methodology. Remember that the goal is to be able to reconstruct your calculations from scratch, using only your records and the assumptions you have documented. If you cannot do that, your records are not sufficient.

Final Review Before Filing

Before you file your tax return or close your books for the year, take the time to review your entire calculation from start to finish. Check that you have included all transactions, that the arithmetic is correct, and that you have applied the correct treatment to each type of event. Look for common errors, such as forgetting to include fees in the cost basis, or using the wrong exchange rate for a transaction. Also, verify that your final gain or loss figures are consistent with the overall picture of your crypto activity. For example, if you had a large number of trades, your total gains should be plausible given the market movements. If something looks off, investigate it further. It is also wise to have a second person review your work, if possible, as a fresh set of eyes can catch mistakes you might have missed. Finally, if you are at all unsure about any aspect of your calculation, or if your situation is complex, such as involving mining, staking, or lending, you should seek the advice of a qualified tax professional. They can help you navigate the rules and ensure that you are meeting your obligations. Remember that tax laws are complex and change frequently, so what was correct last year may not be correct this year. A professional can provide peace of mind and help you avoid costly errors.

BRGeneralEffectiveTax Reporting

FAQ

Does selling change my average cost?

No. A disposal removes units at the current average and reduces both total quantity and total cost proportionally, leaving the average itself unchanged. Only acquisitions move the average. Implementing this wrongly is the most common arithmetic error in the method.

How do I record a crypto to crypto trade?

As both sides at once. It is a disposal of the token you gave up, at its value in reais at that moment, and an acquisition of the token you received at that same value, entering the receiving token's average cost. Recording only one side leaves the disposed quantity unreduced and gives the received token a zero cost.

How do I handle trades priced in dollars or stablecoins?

Convert each leg at the moment of its own transaction, then compute the gain in reais. Converting the gain at a single rate is not equivalent, because the acquisition and the disposal happened on different days and both the crypto price and the currency rate moved in between.

Do transfers between my own wallets affect the calculation?

No. They are not disposals and must not touch the average cost or the quantity. Records that treat a self transfer as a sale invent a gain that does not exist and corrupt the average from that point forward.

Related articles

Tax Reporting
Day Trading Crypto in Brazil: Reporting and the DARF
Tax Reporting
Form 1099-DA and Crypto Basis: What US Filers Must Know Now
Tax Reporting
Norway's CARF Rules Give Tax Authority Direct Sight of Your Crypto
Tax Reporting
HMRC Data: 240 Crypto Millionaires Declared in the UK in 2025