You can't perfectly predict how long your retirement funds will last, since you can't perfectly predict how the market and inflation trends will behave. The 4% rule is a good starting point, but it's important to work with a financial planner to account for your own situation and needs.