I would like to calculate the realized interest rate of my stocks. How can I do that?


I buy stock A for 1000$ in year 1. After 3 years it is worth 1158$ (+5%/a, 158$ profit)

I buy stock B for 500$ in year 2. After 2 years it is worth 530$ (+3%/a, 30$ profit)

My total profit in year 4 is 188$ which corresponds to roughly +4.5%/a on average. I would like to know how I could calculate the 4.5% instead of using trial and error.

  • 1
    You should have the value of your stocks at any day (any end of year period). Where exactly is the trial and error in this calculation?
    – AKdemy
    Commented May 27 at 21:39
  • You can set this up in a spreadsheet or you can use a CAGR calculator. Commented May 27 at 21:46
  • As mentioned, IRR, is what you need. If you don't want to calculate it by hand, here is an IRR calculator (which I created).
    – Karl
    Commented May 28 at 10:53
  • @AKdemy The trial and error was getting the 4.5% without knowing the formula to calculate it.
    – 00koeffers
    Commented May 28 at 18:43

1 Answer 1


In the absence of intermediate valuations use the internal rate of return calculation which only requires cash flows.


line 1

equating the cash flows

line 2

solve for r

line 3

Using Excel

enter image description here

  • In case someone else has a similar question in the future: If the data points are not all at the end of a year but rather distributed over irregular time steps, the Excel-formula is XIRR instead of IRR.
    – 00koeffers
    Commented May 28 at 18:47
  • And Excel will use an algorithm that can be termed as trial and error. It's a goal seek problem in the end and there are well known quick convergion methods. But in most cases there is no closed formula solution. Commented May 28 at 18:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .