Yes. But there is a guiding thumb rule to purchasing a house. At maximum, it should be 3x your family gross income, if you have 20% down.
You can't take into account every variable. But work, repairs, parties, education, food, bills, cars, fuel costs are pretty easily fixed and have their own growth or reduction rate.