Need help with annualized*yield*calculation

Hello everyone, I've been stumped on finding a solution for the following problem and was hoping you could help me out.

I am trying to find the interest percentage for the following problem and the formula for solving it.

The goal is to find the interest rate needed to reach 1,035,479.

Code:

`Beginning Days Deposits Interest Balance`

240,000 0 0 0 240,000

240,000 365 41,514 69,647 351,161

351,161 365 41,514 101,905 494,580

494,580 365 41,514 143,525 679,619

679,619 365 41,514 197,834 918,967

918,967 171 0 116,512 1,035,479

Now, the answer to this problem is roughly 25.4882460120608%.

But I can't seem to find a formula to come to this answer.

Any help would be most appreciated.