There's no gracious way to equally divide the rent. Inevitably, when sharing accommodations, someone will get the smaller room, the room next to the bathroom, the room with the squirrel infestation...you get the picture.

But now, thanks to Jonathan Bittner, an astrophysics graduate student at Harvard University, dividing the rent is no longer a combination of magic and frugality.

Bittner has created SplitTheRent.org, a calculator that "give[s] you a neutral and objective opinion on how to share the rent." The calculator builds on the common idea of price-per-square foot, by also accounting for specific room and apartment details, such as the cost of rooms that are being shared by couples, the quality of the room, (some rooms have no windows, huge closets, bad sound isolation, private bathrooms, etc), and common areas.

Here's an example of how the calculator works from SplitTheRent.org's "How It Works" page.

Let's say a couple (call them Jon and Rebecca) are sharing a \$1,200/month two-bedroom apartment with a single person (Kevin), and both bedrooms are of equal size. Let's say that the size of the kitchen+living room+bathroom is roughly the same size as both bedrooms combined. Then it would be split as follows:

Cost of common areas: \$600, split three ways is \$200
Cost of bedrooms: \$300 per room

Jon pays: \$150 for 1/2 bedroom + \$200 = \$350
Rebecca pays: \$150 for 1/2 bedroom + \$200 = \$350
Kevin pays: \$300 for bedroom + \$200 = \$500

This is good for everyone! Kevin saves \$100/month (\$1,200 per year!) by living with a couple instead of a single roommate, while Rebecca and Jon save money over living alone - single apartments are usually more expensive per square foot. It's fair, because everyone pays for what they get, and saves money for anything they share. If Jon and Rebecca's room is larger, than the calculator can take this into account as well and they rents will be more equal.

The project came from Bittner's love of formula's, surveys, and fairness.

"There's something both fun and funny about using a mathematical way to decide what is fair," says Bittner on his site. "It wasn't in response to anything specific."

You can read more about Bittner's project, and try out the calculator at SplitTheRent.org.