Wanted: Java ccript programmer to create rent vs. own calculator

NEW -> Contingent Buyer Assistance Program

IrvineRenter_IHB

New member
I am searching for a volunteer to create a javascript calculator we can post on the main blog. I would like to use the inputs from the post Rent vs. Own and have a calculator that generates the breakeven rental value for a property based on the cost inputs. Some time ago Swen from the Pacific Beach Bubble Blog created a good one, but I would like to have one based on the inputs from that post. It would end some of the arguments about the value of a property at rental parity.

Anyone out there with the skills, the desire and the time to create this calculator? If so, PM me or respond below.

Thanks,

IR
 
IrvineRenter said:
I am searching for a volunteer to create a javascript calculator we can post on the main blog. I would like to use the inputs from the post Rent vs. Own and have a calculator that generates the breakeven rental value for a property based on the cost inputs. Some time ago Swen from the Pacific Beach Bubble Blog created a good one, but I would like to have one based on the inputs from that post. It would end some of the arguments about the value of a property at rental parity.

Anyone out there with the skills, the desire and the time to create this calculator? If so, PM me or respond below.

Thanks,

IR

I'll find one for you for a 50% mark-up on pay :)
 
Cayci,

Its really quite easy. The only difficult part might be as to what to include in your calculation? Maybe make it -10-15% to give conservative numbers.

-bix
 
Astute Observer said:
Do you have the link to the Pacific Beach Bubble Blog's rent vs. own calculator page?

No, Swen shut down the blog, and I don't know if he had it posted as a link. I used to have a copy, but I don't anymore. It didn't seem like it took him much time to create it.
 
The basic formulas are in the post Rent Versus Own. I would like to have the calculator be able to work from either end. A person should be able to input purchase price and property information and have it spit out the monthly cost of ownership, or they should be able to input a target cost of ownership (rental rate) and have it spit out the breakeven property value.

I think this will be a great service to users of the blog, and it will end a lot of arguments about rental parity.
 
irvine_home_owner said:
I'll be your huckleberry.

Send me the formulas and I'll crank out the code.

(plus this will help me whenever I need to figure out when to buy... hehe)

Yeah, it's easy. Go for it, buddy. I'm going dancing tonight. :-) Wouldn't get to it until Sunday.
 
irvine_home_owner said:
I'll be your huckleberry.

A classic line from a classic performance...

kilmervalphoto.jpg
 
Something I whipped up in a few mins. This calculates purchase price to monthly cost. (replace all "$cript" with "script", "inerHTML" with "innerHTML", "change" to "onchange", and "click" to "onclick")

Code:
	<html>

	<body style="font-family:arial,helvetica">

	

	<$cript language="javascript">

	function calc_per_month() {

	    if (document.form1.purchase) {

	        var purchase_price = document.form1.purchase.value.replace(/$|,/g,'');

	

	        var down = Math.round(purchase_price * 0.2);

	        var mortgage = Math.round(purchase_price * 0.8);

	        var month_rate = 0.065/12;

	        var mortgage_payment = Math.floor((mortgage*month_rate)/(1-Math.pow((1+month_rate),(-1*360)))*100)/100;

	        var prop_tax = purchase_price * 0.01/12;

	        var insurance = purchase_price * 0.0025/12;

	        var stax = purchase_price * 0.0025/12;

	        var hoa = 100;

	        var maint = purchase_price * 0.015/12;

	        var monthly_cost = mortgage_payment + prop_tax + insurance + stax + hoa + maint;

	        var interest = mortgage * month_rate;

	        var tax_savings = -(interest + prop_tax) * 0.25;

	        var equity = -(monthly_cost - interest) * 0.25;

	        var lost = down*0.05/12;

	        var total_cost = monthly_cost + tax_savings + equity + lost;

	

	        document.getElementById('down').inerHTML = format_currency(down);

	        document.getElementById('mortgage').inerHTML = format_currency(mortgage);

	        document.getElementById('mortgage_payment').inerHTML = format_currency(mortgage_payment);

	        document.getElementById('property_tax').inerHTML = format_currency(prop_tax);

	        document.getElementById('homeowners_insurance').inerHTML = format_currency(insurance);

	        document.getElementById('special_taxes').inerHTML = format_currency(stax);

	        document.getElementById('hoa').inerHTML = format_currency(hoa);

	        document.getElementById('maint').inerHTML = format_currency(maint);

	

	        document.getElementById('monthly_cost').inerHTML = format_currency(monthly_cost);

	        document.getElementById('interest').inerHTML = format_currency(interest);

	        document.getElementById('tax_savings').inerHTML = format_currency(tax_savings);

	        document.getElementById('equity').inerHTML = format_currency(equity);

	        document.getElementById('lost').inerHTML = format_currency(lost);

	        document.getElementById('total_cost').inerHTML = format_currency(total_cost);

	    }

	}

	

	function format_currency(num) {

	    num = num.toString().replace(/$|,/g,'');

	    if(isNaN(num)) num = "0";

	    sign = (num == (num = Math.abs(num)));

	    num = Math.floor(num*100+0.50000000001);

	    cents = num % 100;

	    num = Math.floor(num/100).toString();

	    if(cents<10) cents = "0" + cents;

	    for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)

	        num = num.substring(0,num.length-(4*i+3))+','+

	    num.substring(num.length-(4*i+3));

	    return (((sign)?'':'-') + '$' + num + '.' + cents);

	}

	</$cript>

	

	<form name="form1">

	Purchase Price: <input type="text" name="purchase" change="calc_per_month();" size="10"> <a href="#" click="calc_per_month();">Calculate</a>

	</form>

	Down Payment: 


	Mortgage: 


	


	Mortgage Payment:  @ 6.5% 30yr


	Property Taxes:  @ 1%


	Homeowners Insurance:  @ 0.25%


	Special Taxes and Levies:  @ 0.25%


	Homeowners Association Dues or Fees: 


	Maintenance and Replacement Reserves: 


	


	Monthly Cash Cost: 


	


	 Interest on First Payment


	 Tax Savings @ 25% of mortgage interest and property taxes


	 Equity hidden in payment


	 Lost Downpayment Income @ 5% of Downpayment


	


	Total Cost of of Ownership: 
 

	</body>

	

	</html>

Calculating monthly cost to purchase price will be left to the reader as an exercise.
 
IR - Why does the calcuator not consider taxation on foregone income? It appears to factor in gross income vs. net. Can make a sizeable difference in the monthly...
 
ipoplaya said:
IR - Why does the calcuator not consider taxation on foregone income? It appears to factor in gross income vs. net. Can make a sizeable difference in the monthly...

It could probably be added, although the easier solution is to put in an after-tax rate of return on the lost investment opportunity. Perhaps we can add a note to the calculator to input the after-tax rate of investment return.
 
Back
Top