Every year, as the deadline for submitting the Income Tax Return approaches, a common question arises among novice investors and even those who have been trading on the Stock Exchange for some time: how to correctly declare the sale of stocks? Making a mistake at this stage can lead to fines, being flagged by the Federal Revenue, or even paying more tax than necessary. Understanding the rules is not just a legal obligation — it’s also a way to protect your assets.
The declaration of stocks involves concepts that few master: calculation of capital gains, loss compensation, exemption for small-value sales, and the dreaded DARF (Federal Revenue Collection Document). Every detail matters. A sale made in one month can generate a tax payment obligation in the following month, regardless of whether the annual declaration has been submitted.
In this article, you will understand how taxation on stock sales works in Brazil, what the exemption situations are, how to calculate the tax due, how to compensate losses, and, most importantly, how to fill out the declaration correctly. The goal is for you to approach the tax season with clarity and confidence.
What is Taxed When You Sell Stocks
When you sell stocks on the Stock Exchange (B3), what the Income Tax taxes is the capital gain — that is, the positive difference between the selling price and the purchase price of the stocks. If you bought a stock for R$ 20 and sold it for R$ 30, the capital gain is R$ 10 per stock.
This concept seems simple, but the calculation of the acquisition cost can have complications. If you bought the same stock at different times and prices, you need to calculate the weighted average cost of all acquisitions. In practical terms: add up the total amount invested in that asset and divide by the total number of stocks you own. This average cost will be your calculation base.
Attention: brokerage, emolument fees, and other operational costs related to buying and selling can be incorporated into the acquisition cost or deducted from the sale value, reducing the taxable gain. Keep all receipts and brokerage notes.
The Exemption Rule for Sales Up to R$ 20,000
This is one of the most important — and most misunderstood — rules of stock taxation in Brazil. According to current legislation (Article 3, Item II, of Law No. 11,033/2004), stock sale operations on the spot market carried out by a natural person in the same month are exempt from Income Tax when the total sales in that month do not exceed R$ 20,000.00.
Critical points about this exemption:
- The R$ 20,000 limit is on the total amount sold in the month, not on the profit.
- If you sold R$ 19,000 in stocks and made a profit of R$ 5,000, you are exempt. If you sold R$ 21,000 and made a profit of R$ 5,000, the tax applies to the R$ 5,000.
- The exemption applies only to stocks traded on the spot market. Day trade (buying and selling on the same day) has no exemption, regardless of the amount.
- The exemption applies individually to each month. It is not an annual allowance.
- Even if exempt from tax payment, the gain must be reported in the annual declaration as “exempt and non-taxable income”.
Tax Rates: How Much IR You Pay on Profit
When the sale exceeds the exemption limit or is a day trade, the applicable rates are:
Operation Type IR Rate Spot market (swing trade) — sales above R$ 20,000/month 15% on profit Day trade (buy and sell on the same day) 20% on profit Additionally, there is the Withholding Income Tax (IRRF), popularly known as “finger-pointer”:
- For regular operations (swing trade): 0.005% on the sale amount.
- For day trade: 1% on the calculated profit.
This IRRF is automatically withheld by the brokerage at the time of sale and can be deducted from the tax payable calculated by the taxpayer in the month. It mainly serves to identify operations to the Federal Revenue.
Always check the updated rates directly on the Federal Revenue website (receita.fazenda.gov.br), as tax legislation can be changed by law or provisional measure.
How to Calculate and Pay the Monthly DARF
If you sold stocks above the exemption limit and made a profit, the tax must be paid by the last business day of the month following the sale. This payment is made through the DARF, with code 6015 (for regular operations) or 6010 (for day trade).
Step-by-step to calculate and pay the tax:
- Gather the brokerage notes for the month in question, with all purchases and sales made.
- Calculate the average cost of the stocks sold based on previous purchases.
- Calculate the profit: sale value (minus fees and brokerage) less the acquisition cost.
- Check for accumulated losses from previous months to compensate (see next section).
- Apply the rate (15% for swing trade, 20% for day trade) on the net profit.
- Subtract the IRRF already withheld at source by the brokerage.
- Generate the DARF using the Sicalc program (available on the Federal Revenue website) or the “My Income Tax” app and pay by the deadline.
If the calculated amount is less than R$ 10.00, payment is not mandatory that month, but it must be accumulated and paid when it reaches or exceeds this amount.
Loss Compensation: How It Works
One of the most valuable resources for investors is the possibility of compensating losses with future profits. If you had a loss in one month, this amount can be deducted from profits obtained in subsequent months, reducing the tax payable.
Important rules about compensation:
- Losses from regular operations (swing trade) can only be compensated with profits from regular operations. The same applies to day trade: day trade losses only compensate day trade profits.
- There is no expiration date for utilizing the accumulated loss. It can be carried indefinitely until fully compensated.
- The control is the responsibility of the taxpayer. The Federal Revenue does not perform this calculation for you.
- Record the accumulated losses in your annual declaration, in the “Variable Income” section, so that the Revenue is aware of the balance to be compensated.
How to Declare in the Annual IR Declaration
The annual Income Tax declaration (usually submitted between March and May each year, according to the calendar released by the Federal Revenue) requires you to report stock operations in three distinct sections:
Section: Assets and Rights
Report the balance of stocks you own as of December 31 of the calendar year. Use the acquisition cost as the value — never the current market value. Each stock or company should be listed separately, with asset code, company CNPJ, number of stocks, custodian institution, and value.
Section: Variable Income
Record month by month the results of operations: profits, losses, tax paid via DARF, and IRRF withheld. There are specific fields for regular operations and for day trade. This section is also where you record the balance of losses to be compensated.
Section: Exempt and Non-Taxable Income
Profits obtained in months when sales were below R$ 20,000 (and are therefore exempt) must be declared here. Exemption does not mean omission — reporting is mandatory.
To facilitate filling out, many brokerages provide an income report and movement reports that organize the necessary data. Use these documents, but verify the calculations yourself or with the help of an accountant.
Common Mistakes and How to Avoid Them
- Not paying the DARF in the correct month: the tax on capital gains from stocks is monthly and advance, not annual. Delays incur a fine of 0.33% per day (limited to 20%) and interest by the Selic rate. Check the current rates on the Federal Revenue website.
- Ignoring day trade: many beginners do not know that day trade operations have a higher rate (20%) and no exemption.
- Not registering losses: failing to record losses in the declaration means losing the right to compensate them in the future.
- Using the market value instead of the acquisition cost in the Assets and Rights section.
- Confusing dividends with capital gains: dividends received from stocks are exempt from IR and should be declared in the Exempt Income section, not in the Variable Income section.
For a broader guide on how to declare different types of investments, check out: How to Declare Investments on Income Tax.
Conclusion: Stay Organized Throughout the Year, Not Just in April
The biggest pitfall of stock declaration is leaving everything for the IR submission period. Control needs to be monthly: note each purchase, each sale, calculate the average cost, calculate profits, and pay the DARF when necessary. Simple spreadsheets or specialized portfolio control apps can greatly assist in this organization.
Investing in stocks can be a valid strategy for building wealth in the long term, but every investment decision involves risk — including the risk of losing the invested capital. There is no guaranteed return on the Stock Exchange.
The sooner you understand the tax obligations related to your operations, the lower the chance of unpleasant surprises with the Federal Revenue — and the greater the real control over your results.
This content is for educational and informational purposes only. It does not constitute investment advice, financial consultancy, or personalized tax advice. For investment decisions or specific tax issues, consult a qualified professional or investment advisor registered with the CVM (cvm.gov.br).
- Ignoring day trade: many beginners do not know that day trade operations have a higher rate (20%) and no exemption.
- Calculate the average cost of the stocks sold based on previous purchases.
- For day trade: 1% on the calculated profit.
