Buying a home when you have, say, $25,000 of student debt to pay off may seem like a foolish choice—and for some, it may be.

However, with mortgage rates as slow as they are and rent prices continuing to climb in most major metro areas, it may be to your long-term advantage to consider buying, even if you don’t have as much to put down as you’d like.

Consider that 30-year mortgages are running as low as 3.09 percent for people with good or excellent credit. That could put the monthly payment on a $300,000 mortgage right around $1,800-$1,900 with taxes and insurance.

Student loan interest rates, depending on the lender, are hovering in the 5.8 to 8.5 percent range—still low enough to not cost a young person a mountain of worry if the principle isn’t too high.

Now, add to the lower interest rates the fact that rent prices—though plummeting in major cities like San Francisco and New York—actually are climbing in many of the communities that have traditionally had the cheapest rates. The national rent average for one-bedroom apartment is right around $1,230. If you have a family and are looking for a two- or three-bedroom place, the averages jump by $100 to $400 a month, depending on the community.

For long-term investment value, homes continue to rank near the top of reliable options. And even if student debt worries have scared you off, consider that for a couple hundred extra dollars per month, you could be building equity in a solid investment rather than simply paying someone else for the privilege of living on their property.