Q: Should I stretch my budget to buy a house? I’m thinking about buying a first house but I’d have to really stretch my budget to afford it. And, to complicate things, I don’t plan to stay in this first house more than for five years. Is it worth stretching my budget to buy if I’m going to move in a few years?

A: I’m getting this question more often from the latest generation of first-time home buyers who have spent their twenties and early thirties moving around quite a bit.

But buying a home is different from renting. There’s a different calculus because it costs a lot more to buy than rent, especially in the first year.

The answer to the question of whether you should stretch your budget to buy a house is about time: It depends on how long you’re going to stay in that starter home. If you’re only going to stay for five years, you’re on the cusp of profitability – by that I mean it’s tough to break even on a house purchase if you sell within five years of owning it. (I’ll explain more in a moment about how the numbers work.)

The best thing you can do is plan to stay in any home you buy for seven to 10 years in order to ensure that you’re not losing money on the sale. It’s likely that after seven to 10 years, you’ll at least break even on the costs of sale and the costs of the purchase of (and move to) your new home.

The only caveat to this is if you’re unlucky enough to have bought a home in 2004 to 2007 (depending on where you live in the country), which was at the height of the housing boom. Folks who stretched to buy their house then and watched as 30 to 80 percent of the value disappeared overnight, are (in many cases) still waiting for the property values to return. But other than this period of years, if you stay in a new home you buy for seven to 10 years, you should at least break even, if not come out ahead.

Let’s talk for a moment about how much it costs to sell a house.

The cost of sale are significant, and in this post I detail how much you can expect to pay in seller closing costs. When you look at this list, you can understand why someone might not even break if they sell after five years. That’s because the commission might be 4 to 7 percent of the sales price plus another 2 to 4 percent in other costs of sales, like fees, transfer taxes and hiring a moving company, etc.

You also have costs of purchase so when you move from one residence to another, all in, it could cost you 10 percent of the sales price.

Here’s how it works with some real numbers. Let’s say you buy a home for $150,000. You sell for $170,000 four years later. But you pay 6 percent commission, or $10,200. That takes you to $159,800. Now you have to pay transfer taxes and other costs of sale, 3 percent of the sales price or another $5,100. That takes you to $154,700. Now you have to move into your new home, and that costs $1,500, so you have $153,200 left.

So that means (on paper) you might have made $3,200, but in reality, there are so many other costs to absorb (maybe you paid for staging the home or maybe you were carrying two homes for awhile or maybe you have to put in new carpet, paint and appliances into the new home) that this profit gets absorbed.

And, frankly, it would be hard to imagine the property going up 12 percent over 4 years. If it only goes up by 5 percent over 4 years or not at all, you could have easily lost money. That’s why it’s hard to make money on a home purchase after only 5 years.

If you want to stretch your budget to buy a home, here are some ways to do it:

  1. Buy a fixer-upper and build in value. Buying the smallest, ugliest home in a great neighborhood is still a smart financial move. Over time, you can fix up the property or add on to it, building in value.
  2. Buy a home and rent out a room. An in-law suite or extra bedrooms can turn into ready cash, helping you pay the mortgage, taxes and insurance.

Finally, whatever you decide to do, don’t rush to buy something that meets today’s lifestyle. If you’re single, don’t rush to buy something that’s a one-bedroom because over five or seven years your life can change dramatically, forcing you to sell before you’re ready. Over a five to seven year period, you could enter another period of your life, meet a life partner, or even start a family, buy a pet, or have aging relatives move in.

If you’re going to stretch your budget in order to buy a house, you might as well buy the right house for at least the next 10 years of your life.

Ilyce Glink is the publisher of ThinkGlink.com and the CEO of Best Money Moves, a financial wellness app that helps employees dial down financial stress and take control of their financial lives.