Many companies featured on Money advertise with us. Opinions are our own, but compensation and
in-depth research may determine where and how companies appear. Learn more about how we make money.

Women having coffee together in new home
Living with a roommate could save you thousands in certain cities.
Robert Daly—Getty Images/Caiaimage

Looking for a new apartment in San Francisco or New York? You might want to shack up with a roommate.

That's likely advice you've heard before, but prospective renters might not realize that getting a roommate could add tens of thousands of dollars to their nest egg, according to a new report from SmartAsset. The average person saves about $420 a month by living with a roommate -- a figure that adds up to more than $25,000 over five years.

In certain cities, however, the savings are even greater. In San Francisco, for instance, a person living alone would pay an average of $3,548 for a one-bedroom apartment. If he or she decided to split a two-bedroom apartment -- and divide rent equally -- the new monthly rent would be $2,433 -- amounting to monthly savings of about $1,100.

Similarly, in New York, the monthly savings for living with a roommate are just over $1,000. In both pricy cities, shacking up could save you more than $60,000 over five years.

The savings for getting a roommate in these cities are followed by those in San Jose, Calif.; Boston; and Oakland, Calif., where living with a friend amounts to monthly savings of $841, $810 and $733, respectively.

Read More: 20 Things to Consider Before Renting an Apartment

If you absolutely can't deal with living with a roommate, you might want to head to the Southwest. Tucson, Ariz.; Mesa, Ariz.; and El Paso, Tex. ranked among the five cities (of the 50 studied by SmartAsset) where renters see the smallest savings for splitting expenses with a roommate. In Tucson, renters save just $187 monthly for shacking up with a friend, while they save $240 and $252, respectively, for doing so in Mesa and El Paso.