원리금 균등 상환 공식

function halbu_same($src,$rate,$period)
{
        //인풋부분 : src(원금), rate(이율-소수점단위), period(기간-개월수)
        $s_rate = 1 + ( $rate / 12 );//원금증가율
        $o_money = $src * ( 1 - $s_rate) / ( 1 - pow($s_rate,$period));//초회원금
        $r_money = $src * $rate / 12;//초회이자
        return ceil($o_money + $r_money);//월상환금액(원리금균등분할상환)
        //소수점 자리 처리 => ceil(올림), round(반올림), floor(절사) 캐피탈사마다 다름
// 예제 : 500만원을 7.5%의 이율로 24개월 대출 받았을 때 월상환금액 구하기
$money = halbu_same( 5000000, 0.075, 24 );
print $money; //224,998원

댓글

  1. According to Stanford Medical, It is really the one and ONLY reason this country's women live 10 years more and weigh on average 42 pounds less than we do.

    (And by the way, it has absolutely NOTHING to do with genetics or some hard exercise and absolutely EVERYTHING about "how" they eat.)

    P.S, What I said is "HOW", not "WHAT"...

    Click this link to see if this easy quiz can help you discover your true weight loss potential

    답글삭제

댓글 쓰기