There's a reason we're all advised to keep our housing costs to a minimum. Overspending on a rent or mortgage payment can leave us with limited wiggle room for the rest of our expenses, and too high a housing payment can hinder our ability to save for the future. Yet an alarming number of Americans are spending more than they should to live in their homes.

According to a 2014 report by the Joint Center for Housing Studies of Harvard University, a record 11 million Americans are spending at least half of their monthly income on housing alone. Meanwhile, over 21 million are spending 30% or more of their take-home pay on housing.

A pink sticky note reading "pay the rent" is tacked to a wooden surface.

IMAGE SOURCE: GETTY IMAGES.

City dwellers are the most likely to fall into this trap. In the 10 cities in the nation where housing is most expensive, almost 75% of renters earning between $30,000 and $44,999, and a good 50% of renters earning between $45,000 and $75,000, are forking over at least 30% of their take-home pay to put a roof over their heads. But there's a danger to exceeding that 30% threshold, and if more households aren't careful, they'll soon learn the hard way that overspending on housing is a dangerous prospect.

Can you really afford your home?

Generally speaking, you should aim to keep your housing costs to 30% or less of your take-home pay. Now, if you live in a city where you don't need a vehicle and transportation comes cheap, and housing really is your single greatest expense, you might get away with spending a little more than 30% of your income on rent -- but only a little bit. The fact that 11 million people are spending at least half of their earnings on housing means they're leaving themselves an alarmingly small amount of leeway for other expenses.

In a MacArthur Foundation report, between 2011 and 2014, an estimated 52% of Americans wound up making at least one major sacrifice to cover their housing payments. These included getting a second job, putting off retirement savings, cutting back on healthcare, and taking on credit card debt -- moves that could affect your finances and general well-being on a long-term basis.

Take retirement savings, for example. Imagine you're spending so much on rent that you only manage to squeeze out $50 a month for your IRA or 401(k). If this continues throughout your career, then in 30 years' time, you'll wind up with a $40,000 nest egg, assuming your investments generate a moderately conservative 5% average annual return.

Now imagine that instead of forking over so much money in rent, you keep your housing costs low and manage to sock away $300 a month instead of just $50. All other things being equal, after 30 years, you'll wind up with $239,000 in time for retirement -- a far more comforting number.

Here's another problem with overspending on housing. Most Americans don't have $1,000 in the bank. If you lose your job, or fall ill and can't work for several months at a time, you'll risk taking on serious levels of credit card debt if your housing costs are high to begin with -- because while you may be able to scale back other costs temporarily, like your grocery bills, if you're locked into a lease (or mortgage), you'll have far less flexibility.

That's why you're better off keeping your housing costs as low as possible, even if doing so means living in a less convenient neighborhood or renting a smaller unit. If moving from the heart of a city to the outskirts shaves $300 a month off of your rent, you'll have an extra $3,600 to work with over the course of each year. And if you find yourself unable to work for a number of months, you'll have that much less to cover while you're temporarily without an income.

Though it's natural to want a nice home, before you bust your budget on rent payments, think about the other things you might need to give up to live there. At the end of the day, you'll probably come to find that a better home just isn't worth it.