Test

    function computeForm(form) {

    var Vpurchase = sn(document.calc.purchase.value);
    var Vsale_price = sn(document.calc.sale_price.value);
    var Vfed_rate = sn(document.calc.fed_rate.value);
    var Vstate_rate = sn(document.calc.state_rate.value);

    if(Vpurchase == 0) {
    alert(“Please enter the original purchase price of the property.”);
    document.calc.purchase.focus();
    } else
    if(Vsale_price == 0) {
    alert(“Please enter the selling price of the property.”);
    document.calc.sale_price.focus();
    } else
    if(Vfed_rate == 0) {
    alert(“Please enter the federal capital gain tax rate percentage.”);
    document.calc.fed_rate.focus();
    } else
    if(Vstate_rate == 0) {
    alert(“Please enter the state capital gain tax rate percentage.”);
    document.calc.state_rate.focus();
    } else {

    var Vimprove = sn(document.calc.improve.value);
    var Vdeprec = sn(document.calc.deprec.value);
    var Vexpenses = sn(document.calc.expenses.value);
    var Vloan_bal = sn(document.calc.loan_bal.value);

    var Vnab = Number(Vpurchase) + Number(Vimprove) – Number(Vdeprec);
    document.calc.nab.value = fns(Vnab,2,1,1,1);

    Vcap_gain = Number(Vsale_price) – Number(Vnab) – Number(Vexpenses);
    document.calc.cap_gain.value = fns(Vcap_gain,2,1,1,1);

    Vrecap = Vdeprec * .25;
    document.calc.recap.value = fns(Vrecap,2,1,1,1);

    if(Vfed_rate >= 1) {
    Vfed_rate /= 100;
    }
    Vfed_tax = (Number(Vcap_gain) – Number(Vdeprec)) * Vfed_rate;
    document.calc.fed_tax.value = fns(Vfed_tax,2,1,1,1);

    if(Vstate_rate >= 1) {
    Vstate_rate /= 100;
    }
    Vstate_tax = Vcap_gain * Vstate_rate;
    document.calc.state_tax.value = fns(Vstate_tax,2,1,1,1);

    Vtotal_tax = Number(Vrecap) + Number(Vfed_tax) + Number(Vstate_tax);
    document.calc.total_tax.value = fns(Vtotal_tax,2,1,1,1);

    Vgross = Number(Vsale_price) – Number(Vexpenses) – Number(Vloan_bal);
    document.calc.gross.value = fns(Vgross,2,1,1,1);

    Vnet = Number(Vgross) – Number(Vtotal_tax);
    document.calc.net.value = fns(Vnet,2,1,1,1);

    Vsale_equity = Vnet * 4;
    document.calc.sale_equity.value = fns(Vsale_equity,2,1,1,1);

    Vexchange_equity = Vgross * 4;
    document.calc.exchange_equity.value = fns(Vexchange_equity,2,1,1,1);

    }
    }

    function clear_results(form) {

    document.calc.nab.value = “”;
    document.calc.cap_gain.value = “”;
    document.calc.recap.value = “”;
    document.calc.fed_tax.value = “”;
    document.calc.state_tax.value = “”;
    document.calc.total_tax.value = “”;
    document.calc.gross.value = “”;
    document.calc.net.value = “”;
    document.calc.sale_equity.value = “”;
    document.calc.exchange_equity.value = “”;

    }

    Contact Us Now

    Any questions, comments, or feedback


    Hargrove Realty Group
    106 N Denton Tap Rd
    Coppell, TX 75019
    Phone: 972-468-7900