Whether you rent or own, housing is likely your biggest expense. After all, home prices are increasing twice as fast as incomes, and rent keeps rising, too. Still, if possible, you don't want to spend more than 35 percent of your annual, after-tax income on housing, says bestselling author and co-founder of AE Wealth Management David Bach.
"The goal should be: No more than one-third of your income should be going to housing," he tells CNBC Make It. "Ideally, it's even less."
If you rent, that includes utilities and any broker fees you had to pay. If you own, it includes other costs like mortgage interest, property taxes, maintenance and renovations. And if you want to think about things in terms of gross income, rather than after-tax income, aim to spend less than 30 percent on housing costs.
Another popular guideline people follow is the "28/36 rule," which says that you should spend no more than 28 percent of your gross monthly income on housing costs and no more than 36 percent on total debt, including housing and other debt like student loans or car loans. Mortgage lenders use this rule to assess your borrowing capacity. If your debt-to-income ratio exceeds these limits, you may have to pay a higher interest rate or you might not be able to get a loan at all.
While these guidelines can be helpful, everyone's financial situation is different. If you don't spend much on entertainment or transportation, you may have more room in your budget for housing.
Plus, "it really depends on where you live," says Bach. If you're living in a big city, it may be impossible to keep your housing costs at or below 30 percent. In New York City, residents put nearly two-thirds of their income towards rent, often because they don't have any other choice.
If you're looking to retire early or have other ambitious savings goals, you may want to downsize and spend well under the 30 percent threshold. That's what one Chicago-based couple did: By spending less than 15 percent of their income on housing, they managed to bank $50,000 in just one year.
To figure out how much you can afford to spend on housing, keep these guidelines in mind, look at your budget and consider your long-term saving goals.
Like this story? Subscribe to CNBC Make It on YouTube!