Can you afford to buy a home? Nationstar's website provides a calculator to help you find out. 

A “Buy vs. Rent” calculator can help you compare the relative costs of both options by entering relevant personal data. For example,'s calculator measures the relative cost of a home and rent in the area where you live.

It gives you a breakdown of the costs of owning, including the initial costs, what you pay in mortgage payments and projected maintenance costs, the cost of eventually selling the property and what it calls “lost opportunity” costs – what you might have made if you had invested the initial costs in a profitable venture.

It compiles a similar breakdown for renting and then gives you a graph showing when, if ever, buying is more advantageous than renting.

If you want a less complicated calculator, Trulia offers one that works off much less data. It takes the price of a house you are considering, the amount of rent you would otherwise pay, the number of years you plan to live in the house, your tax bracket and interest rate and creates a chart showing by what percentage owning or renting is cheaper.

per Consumer Affairs