Stock Return Calculator
Calculate the total return of your stock market investment, adding capital gain and dividends received, with its annualised equivalent.
Results
Total return
—
Return (%)
—
Annualised return (CAGR)
—
Capital gain
—
Total invested
—
Total return = (net sale value ∑’ total invested) + dividends received. Annualised return (CAGR) is calculated as [(final value · total invested)^(1/years) ∑’ 1] — 100.
Investment return evolution
When should you use this calculator?
This calculator estimates the total return of a stock investment, combining the capital gain or loss with dividends received over the period, and converts the result into an annualised rate comparable across investments.
How it is calculated
Total return is calculated by adding the capital gain (the net sale value minus the total invested, including buy and sell commissions) and the dividends received over the period: total return = (net sale value ∑’ total invested) + dividends. To compare this investment with others of different duration, the annualised return or CAGR is also calculated: [(final value · total invested)^(1/years) ∑’ 1] — 100, which expresses the result as if it had been earned at a constant rate every year.
Practical example
A numeric example: buying 100 shares at €20 each (€2,000 plus a €5 buy commission, €2,005 total invested), and selling them 3 years later at €26 each (€2,600 gross minus a €5 sell commission, €2,595 net), the capital gain is €590. Adding €80 of dividends received during those 3 years, the total return is €670, a 33.42% return on the amount invested. The annualised return (CAGR) of this trade is 10.09% a year.
CAGR lets you compare investments of different duration on equal footing: gaining 33.42% over 3 years is not the same as gaining it over 1 year or over 10 years. Two investments with the same total return percentage but different durations have very different CAGRs: a 33.42% return over 1 year equals a 33.42% CAGR, while the same total return spread over 10 years equals a CAGR of only about 2.93%. That's why CAGR, not simple return, is the right figure to compare investments with different time horizons, or to compare against other products like a deposit or an index fund.
Common mistakes
A common mistake is focusing only on the share price's appreciation and forgetting dividends: in mature-sector companies (energy, banking, telecoms), a significant part of historical returns often comes precisely from accumulated dividends, not price increases. Another frequent mistake is ignoring the effect of buy and sell commissions, which on small trades can represent a significant percentage of the total return. It's also worth avoiding directly comparing simple returns of investments with different durations without going through CAGR first.
Legal and tax context
In Spain, both capital gains and dividends are taxed as savings income at rates between 19% and 28% depending on the total yearly amount, adding up all of the taxpayer's savings gains and income. The exact taxation varies by country of tax residence, so it's worth checking the rules that apply to you: the results of this calculator are gross, before taxes.
Practical tips
The result of this calculator is a mathematical estimate based on the figures entered and does not constitute investment advice. Individual shares carry a company-specific risk (poor management, a declining sector, even bankruptcy) that a diversified fund doesn't carry to the same degree, and the past performance of a share or a specific period doesn't guarantee future results. Diversifying across different companies and sectors reduces the specific risk of any single share.
Other calculators you may find useful
If you found this calculator useful, you might also want to check out:
Frequently asked questions
What is the total return of a stock?
It is the sum of the capital gain (or loss) made when selling the stock at a different price than you bought it, plus all dividends received while you held it.
How is annualised return (CAGR) calculated?
CAGR (compound annual growth rate) is calculated as [(final value of the total invested · total invested)^(1/number of years) ∑’ 1] — 100, and lets you compare investments of different durations on equal terms.
Do dividends count towards the return?
Yes, dividends are part of the total return of the investment alongside the capital gain, and this calculator adds them directly into the result.
Does this calculator account for taxes?
No. Results are gross, before taxes. In Spain, gains and dividends are taxed as savings income between 19% and 28% depending on the total yearly amount, though taxation varies by country of residence.
Why is the annualised return (CAGR) different from the simple return?
The simple return doesn't account for how long the money was invested; the CAGR does, expressing the result as an equivalent constant annual rate. That's why a 33.42% simple return over 3 years gives a 10.09% CAGR, not 33.42% a year.
How do commissions affect the return on a small trade?
The smaller the amount invested, the greater the relative weight of fixed buy and sell commissions on the total return. On large trades, that same fixed cost weighs proportionally much less.
What does a negative or -100% CAGR mean?
A -100% CAGR indicates the investment lost all its value (or more, if additional fees exceeded the capital), since a compound growth rate can't mathematically be calculated on a final value at or below zero.
Can this calculator be used to compare shares with an index fund?
Yes, as long as you use the annualised return (CAGR) of both products over the same period, since that's the metric that lets you fairly compare investments of different nature and time horizon.
What if I sold in several batches at different prices?
This calculator assumes a single buy and sell operation with one price for all the shares. If you bought in several batches at different prices, work out your weighted average buy price first before using the calculator.
Should I include gross or net-of-withholding dividends?
Enter the amount you actually received (net of any withholding already applied at source), since that's the real money that entered your account and forms part of your effective return.