The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “1Win

Any Mathematicians Here? >>>see this

Graybeard

Well-Known Member
PHP:
function calcPayment(
    float $loanAmount,
    int $totalPayments,
    float $interest
)
{
    //***********************************************************
    //              INTEREST * ((1 + INTEREST) ^ TOTALPAYMENTS)
    // PMT = LOAN * -------------------------------------------
    //                  ((1 + INTEREST) ^ TOTALPAYMENTS) - 1
    //***********************************************************

    $value1 = $interest * pow((1 + $interest), $totalPayments);
    $value2 = pow((1 + $interest), $totalPayments) - 1;
    $pmt    = $loanAmount * ($value1 / $value2);
    return $pmt;

Im MySQL

Code:
mysql> select 0.0249/12*170000*power(1+0.0249/12,25*12)/(power(1+0.0249/12,25*12)-1);
+------------------------------------------------------------------------+
| 0.0249/12*170000*power(1+0.0249/12,25*12)/(power(1+0.0249/12,25*12)-1) |
+------------------------------------------------------------------------+
|                                                       761.792586559163 |
+------------------------------------------------------------------------+
1 row in set (0.00 sec)

fine knowing the principal BUT --
Say I want to how much I could borrow?

$payment = 75
$term = 120 #months
$interest = 0.06/12

$loan_origination_principal = ? (return {answer})

Anyone have an idea?
 
Last edited:
I solved it
What a headache too many hours

PHP:
$bill = 70;//solar replacement :)
$p = 0; // start amount
$i = (0.08); // Interest rate
$c = 12; // interest frequency set to monthly
$n = 120/12; // term
$r = $bill; // payment
//secret sauce
$total_apply = (70 * 120);
$loanCost =  round($vf, 2, PHP_ROUND_HALF_UP);
$borrow = ($total_apply / $loanCost);
$loan_ammt = ($borrow * $total_apply);

//secret sauce
output
Your electric bill use minus the distribution cost: $70 @8%APR you can borrow $5546.7991525724
proof
=fv(8%/12,120,5546.7991525724/120,0,0)
($8,456)
I am off by $16 sue me LOL

grrr
 
Last edited:
banners
Back