Calculating your optimal retirement corpus can be done in 3 sequential stages.
1. Calculating present-day expenses
2. Calculating retirement expenses
3. Calculating your optimal retirement corpus