take a look at this link, this calculator is missing a few variable but gets the main point across.
http://www.nytimes.com/2007/04/10/business/2007_BUYRENT_GRAPHIC.html?_r=3&ei=5070&en=5d50496ada0f2438&ex=1178942400&adxnnl=1&oref=slogin&adxnnlx=1190337317-FTRBbN6moQeLQED4NwNbWQ&oref=slogin&oref=slogin