It’s a whole lot more complicated.
1. You need to calculate your ‘stache based on what your spending will be in retirement not what it is now. You may need to pay more or less for healthcare, for example, and there will be other expenses (dry cleaning work clothes, commute costs, etc.) that will go away while others will emerge (more travel, new hobbies, etc.). You may also have paid off your mortgage by then or become eligible for senior rates on property taxes.
2. You can factor in some expected income from social security (to be conservative take 75% of the amount calculated by the SSA to reflect the chance that current funding does not change and payouts need to be reduced to match the level of payroll tax receipts).
3. If you think that you will be able to reduce your spending if the market crashes, and/or you anticipate that your spending will decline over time as you age, you can use a higher withdrawal rate than 4%. Bogleheads has an interesting calculator for using variable percentage withdrawal where your withdrawal amounts change monthly based on your current liquid net worth.
4. If you plan a super-early retirement and are not prepared to return to work in the event of a major market correction, you may need to use a lower withdrawal rate to assure yourself of not running out of money. Some folks use as low as 2% for 60 year timeframes.
There’s a lot more but those points are a good starting point for thinking about it all.