The old real estate adage "location, location, location" still holds true — especially when it comes to your housing budget. The cost of an apartment can vary wildly depending on your neighborhood or town.

In New Jersey, for example, while you might feel cramped squeezing into 400-square-foot studio in Jersey City, you're likely to get more bang for your buck in the neighboring city of Newark.

Using data from the U.S. Census Bureau and Yardi Matrix, real-estate website RENTCafé compared the median monthly household income for renters to the average rent in the 100 most populous U.S. cities in order to determine how much space you can afford across the country.

The researchers adjusted each city's median income for inflation to reflect 2019 values, then determined how many square feet you could afford in each place if you don't spend more than the expert-advised 30% of your income on rent. Of the 100 cities it looked at, only 14 allow renters to live comfortably within their means, the site concluded.

Here's how much space you could afford on a median income in the two biggest cities in New Jersey, as well as in Manhattan, for comparison, which is less than 30 miles away from each New Jersey location.