This calculator runs on the same engine as the compound interest lesson: a monthly contribution growing for decades. The retirement question just adds two layers on top: inflation, so the final number is in today's money, and the 4% rule, so a balance turns into a monthly income.