Stock Trade Profit Calculator
Compute profit/loss on stock buy/sell: buy price, sell price, qty, fees. 15% IR on profit.
How spot stock returns are calculated
The return on a spot stock trade is return = (P_sell − P_buy + dividends) / P_buy · 100%. To annualize a partial-period return, use (1 + return)^(365/days) − 1, which assumes the same rate could be repeated. Example: buying PETR4 at R$ 32 and selling at R$ 38 after 180 days, with R$ 1.20 in dividends, gives a gross return of 22.5% in the period and roughly 50.1% annualized.
Brazilian costs to net out: brokerage is now zero at most modern brokers (XP, Clear, Rico, BTG, Nubank Invest), B3 emoluments around 0.0345% of the trade, and income tax of 15% on swing-trade capital gains or 20% on day trade. Law 11.033/2004 exempts swing-trade sales totaling up to R$ 20,000 per month. Dividends are currently tax-free for individuals, although the ongoing tax reform may change this.
Brazilian context
B3 is the only stock exchange in Brazil and trades nearly 400 listed companies. Most investors track portfolios through Status Invest or Investidor10 and execute through home-broker platforms. The DARF for capital gains must be paid by the last business day of the month following the sale; for IRPF (annual return), each operation must be reported on the "Renda Variável" worksheet.
FAQ
Does the R$ 20,000/month exemption apply per stock or total? Total — it is the sum of sale value (not profit) across all spot stocks in the month. If you sold R$ 25,000 in one stock and R$ 0 in others, the full gain is taxable.
How is the average buy price calculated? Weighted average: sum the total invested across all purchases (including costs) and divide by the total number of shares. Sales reduce quantity but do not change the average price.
Can I offset losses against gains? Yes — swing-trade losses offset only swing-trade gains, and day-trade losses offset only day-trade gains. Carryover is indefinite, tracked monthly on your own records or via broker-issued reports.
Are FIIs (real-estate funds) taxed the same way? No — FII gains are always taxed at 20% with no exemption threshold, and monthly dividend distributions are tax-free for individuals holding fewer than 10% of the fund.
Related Tools
Rent Adjustment Calculator
Compute annual rent adjustment by IGP-M or IPCA accumulated in the last 12 months (manually configurable).
Pregnancy Calculator
Compute estimated due date (EDD), gestational age and trimester from the last menstrual period (LMP).
Fertile Period Calculator
Compute fertile window and ovulation day from the first day of the last cycle and the average cycle length.