Rebuild the calculation piece by piece — copying it exactly rather than reinterpreting it — then run it on infrastructure that can grow without changing the maths.
The web application stayed where it was, because that is where the business rules and the record of who did what already live, and rewriting it would have added risk without adding value. Only the number-crunching moved. Large jobs were taken off the main system and spread across cloud computing that scales up when there is more to do, then releases when it is finished. Completed results are copied to a separate reporting database on a schedule, so looking at history no longer slows anyone down.
There was never a cutover weekend, because there was never a moment when the whole engine changed at once.