How it works
Every flow is placed on its actual date and the calculator solves for the single annual rate at which their present values sum to zero. Money leaving your pocket is negative; money coming back, including the current value of what you still hold, is positive.
The day count is Actual/365 measured from the earliest flow, so leap years need no special handling — a span containing 29 February is simply one day longer. There is no closed form for this, so the rate is found numerically: Newton-Raphson from a sensible starting guess, falling back to bisection on a bracketed sign change when Newton wanders outside the bounds.
More detail
The series is sorted before solving and shown in that order, because the schedule you read should be the schedule the arithmetic walked.
Where no rate exists, the calculator says so rather than returning zero. A series in which every flow points the same way has no rate of return — there is nothing for it to balance — and reporting 0% would be a wrong answer rather than an absent one.
For a single investment held over one period, use the CAGR calculator.
To project a regular monthly investment forward instead, see the SIP calculator.
For a property held over years, try the property return calculator.