For each mile you drive across two times on your round trip to work daily, it multiplies to 500 miles per year, or a $170 annual fee. For each of these miles, you waste about 6 minutes in the round trip, adding to 25 hours per year ($625 of your time).
So each mile you live from work steals $795 per year from you in commuting costs. $795 per year will pay the interest on $15,900 of house borrowed at a 5% interest rate.
In other words, a logical person should be willing to pay about $15,900 more for a house that is one mile closer to work, and $477,000 more for a house that is 30 miles closer to work. For a double-commuting couple, these numbers are $31,800 and $954,000.