does anybody have code to work out returns on standard bank investments, i.e.
$amount, $interest, $term as the variables?
thanks
does anybody have code to work out returns on standard bank investments, i.e.
$amount, $interest, $term as the variables?
thanks
Not offhand, but it would only be a few lines of code, wouldn't it? I'm not the most familiar (at all) with bank investments, but it'd be just be basic math in a function. If you have a formula or something we could work out a function for you, I guess.
hi, i dont have a formula, just doing a demo for a site, was kinda hoping somebody might have done something similiar as i want to show realistic numbers...
kind of for long term investment, 5000 over 5 years at 5% etc, i've tried to work out a formula from entering data on other sites but it does not seem to be so straight forward.....
Google around for compound interest formulas, maybe.
/*
$a = Amount after n years
$i = Initial investment
$r = Rate of interest (as decimal)
$y = Number of years invested for
$n = Number of times per year the interest is compounded
*/
$a = number_format($i * pow((1 + $r / $n), ($n * $y)), 2);