Relevant: https://www.nytimes.com/interactive/2024/upshot/buy-rent-cal...
If you're just looking at the numbers, it's worth doing the math. Obviously many things will be estimates.
Most people don't do apples to oranges comparisons, because a 2-bedroom, 1.5 bathroom you're living in is not comparable to a 3-bedroom, 2 bathroom, quarter acre house on a lot you're considering buying.
So it's obviously not just math, but also preference, or need.
Local house prices, tax rates, utility rates, services for maintenance and upgrade... they'll all vary greatly depending on the area. And if you're moving from an urban apartment to a suburban house, you're changing how much you'll drive, maybe even need an additional car. But maybe you turn in your rail pass, and decide to cook at home more, and eat out less.
If you think you can decide this based on a formula (or some folk wisdom), well you probably can, for yourself. But of course there's no one universal right answer that applies to most people, because there are too many variables and too many options.