PHP 만기일시 VS 원금균등분할 VS 원리금균등상환 공식업로드합니다.
2018. 10. 24. 00:24ㆍPHP
반응형
PHP 만기일시 VS 원금균등분할 VS 원리금균등상환 공식업로드합니다.
**연 원리금 계산공식**
대출 : 5000만원 60개월(대출기간) 3.5이율 일 경우
1년치 상환액을 기준으로 합니다.
1.) 만기일시 연상환액 계산공식
function endAllFunc($src, $rate, $period) {
$endAll_rtn = 0;
if($period > 12) $endAll_rtn = round($src * (1+($rate/100) *($period/12)) / ($period/12));
else $endAll_rtn = round($src * (1+($rate/100) *($period/12)) );
return $endAll_rtn;
}
5000만원 * (1+(3.5/100)) * (60/12)) / (60/12) = 11,750,000원
2) 원금균등분할
//원금균등분할
function psameFunc($src, $rate, $period) {
//이자율변환
$rate = $rate / 100;
//균등분할원금
$o_money = round($src/$period);
$r_money = 0;
for($i=0; $i<$period; $i++ ){
$r_money += ($o_money+round(($src-($o_money*$i)) * $rate/12));
}
$psame_rtn = 0;
if($period > 12) $psame_rtn = round($r_money/$period*12);
else $psame_rtn = round($r_money/$period*$period);
return $psame_rtn;
}
No 상환금 납입원금 이자 납입원금계 잔금
1 979,163 833,333 145,830 833,333 49,166,667
2 976,733 833,333 143,400 1,666,666 48,333,334
3 974,303 833,333 140,970 2,499,999 47,500,001
4 971,873 833,333 138,540 3,333,332 46,666,668
5 969,443 833,333 136,110 4,166,665 45,833,335
6 967,013 833,333 133,680 4,999,998 45,000,002
7 964,583 833,333 131,250 5,833,331 44,166,669
8 962,143 833,333 128,810 6,666,664 43,333,336
9 959,713 833,333 126,380 7,499,997 42,500,003
10 957,283 833,333 123,950 8,333,330 41,666,670
11 954,853 833,333 121,520 9,166,663 40,833,337
12 952,423 833,333 119,090 9,999,996 40,000,004
13 949,993 833,333 116,660 10,833,329 39,166,671
14 947,563 833,333 114,230 11,666,662 38,333,338
15 945,133 833,333 111,800 12,499,995 37,500,005
16 942,703 833,333 109,370 13,333,328 36,666,672
17 940,273 833,333 106,940 14,166,661 35,833,339
18 937,843 833,333 104,510 14,999,994 35,000,006
19 935,413 833,333 102,080 15,833,327 34,166,673
20 932,983 833,333 99,650 16,666,660 33,333,340
21 930,553 833,333 97,220 17,499,993 32,500,007
22 928,123 833,333 94,790 18,333,326 31,666,674
23 925,693 833,333 92,360 19,166,659 30,833,341
24 923,263 833,333 89,930 19,999,992 30,000,008
25 920,833 833,333 87,500 20,833,325 29,166,675
26 918,393 833,333 85,060 21,666,658 28,333,342
27 915,963 833,333 82,630 22,499,991 27,500,009
28 913,533 833,333 80,200 23,333,324 26,666,676
29 911,103 833,333 77,770 24,166,657 25,833,343
30 908,673 833,333 75,340 24,999,990 25,000,010
31 906,243 833,333 72,910 25,833,323 24,166,677
32 903,813 833,333 70,480 26,666,656 23,333,344
33 901,383 833,333 68,050 27,499,989 22,500,011
34 898,953 833,333 65,620 28,333,322 21,666,678
35 896,523 833,333 63,190 29,166,655 20,833,345
36 894,093 833,333 60,760 29,999,988 20,000,012
37 891,663 833,333 58,330 30,833,321 19,166,679
38 889,233 833,333 55,900 31,666,654 18,333,346
39 886,803 833,333 53,470 32,499,987 17,500,013
40 884,373 833,333 51,040 33,333,320 16,666,680
41 881,943 833,333 48,610 34,166,653 15,833,347
42 879,513 833,333 46,180 34,999,986 15,000,014
43 877,083 833,333 43,750 35,833,319 14,166,681
44 874,643 833,333 41,310 36,666,652 13,333,348
45 872,213 833,333 38,880 37,499,985 12,500,015
46 869,783 833,333 36,450 38,333,318 11,666,682
47 867,353 833,333 34,020 39,166,651 10,833,349
48 864,923 833,333 31,590 39,999,984 10,000,016
49 862,493 833,333 29,160 40,833,317 9,166,683
50 860,063 833,333 26,730 41,666,650 8,333,350
51 857,633 833,333 24,300 42,499,983 7,500,017
52 855,203 833,333 21,870 43,333,316 6,666,684
53 852,773 833,333 19,440 44,166,649 5,833,351
54 850,343 833,333 17,010 44,999,982 5,000,018
55 847,913 833,333 14,580 45,833,315 4,166,685
56 845,483 833,333 12,150 46,666,648 3,333,352
57 843,053 833,333 9,720 47,499,981 2,500,019
58 840,623 833,333 7,290 48,333,314 1,666,686
59 838,193 833,333 4,860 49,166,647 833,353
60 835,783 833,353 2,430 50,000,000 0
총상환금 : 상환금을 모두 더한값(원금+총 이자)
-대출기간이 12개월이상 시 : 연원리금 = 총 상환금 / 대출기간(60) * 1년(12)
-대출기간이 12개월미만 시 : 연원리금 = 총 상환금
3) 원리금균등상환
//원리금 균등 상환공식
function isameFunc($src, $rate, $period) {
//이자율변환
$rate = $rate / 100;
//src-원금; rate-이율; period-기간;
$s_rate = 1 + ($rate/12);//원금증가율
$o_money = $src * ( 1 - $s_rate) / ( 1 - pow($s_rate,$period));//초회원금
$r_money = $src * $rate / 12; //초회이자
$iSame_rtn = 0;
if($period > 12) $iSame_rtn = round(($o_money + $r_money) * 12) ; //년 상환금액
else $iSame_rtn = round(($o_money + $r_money) * $period) ; //년 상환금액
return $iSame_rtn;
}
No 상환금 납입원금 이자 납입원금계 잔금
1 909,587 763,757 145,830 763,757 49,236,243
2 909,587 765,987 143,600 1,529,744 48,470,256
3 909,587 768,217 141,370 2,297,961 47,702,039
4 909,587 770,457 139,130 3,068,418 46,931,582
5 909,587 772,707 136,880 3,841,125 46,158,875
6 909,587 774,957 134,630 4,616,082 45,383,918
7 909,587 777,227 132,360 5,393,309 44,606,691
8 909,587 779,487 130,100 6,172,796 43,827,204
9 909,587 781,767 127,820 6,954,563 43,045,437
10 909,587 784,047 125,540 7,738,610 42,261,390
11 909,587 786,327 123,260 8,524,937 41,475,063
12 909,587 788,627 120,960 9,313,564 40,686,436
13 909,587 790,927 118,660 10,104,491 39,895,509
14 909,587 793,227 116,360 10,897,718 39,102,282
15 909,587 795,547 114,040 11,693,265 38,306,735
16 909,587 797,867 111,720 12,491,132 37,508,868
17 909,587 800,187 109,400 13,291,319 36,708,681
18 909,587 802,527 107,060 14,093,846 35,906,154
19 909,587 804,867 104,720 14,898,713 35,101,287
20 909,587 807,217 102,370 15,705,930 34,294,070
21 909,587 809,567 100,020 16,515,497 33,484,503
22 909,587 811,927 97,660 17,327,424 32,672,576
23 909,587 814,297 95,290 18,141,721 31,858,279
24 909,587 816,677 92,910 18,958,398 31,041,602
25 909,587 819,057 90,530 19,777,455 30,222,545
26 909,587 821,447 88,140 20,598,902 29,401,098
27 909,587 823,837 85,750 21,422,739 28,577,261
28 909,587 826,237 83,350 22,248,976 27,751,024
29 909,587 828,647 80,940 23,077,623 26,922,377
30 909,587 831,067 78,520 23,908,690 26,091,310
31 909,587 833,497 76,090 24,742,187 25,257,813
32 909,587 835,927 73,660 25,578,114 24,421,886
33 909,587 838,357 71,230 26,416,471 23,583,529
34 909,587 840,807 68,780 27,257,278 22,742,722
35 909,587 843,257 66,330 28,100,535 21,899,465
36 909,587 845,717 63,870 28,946,252 21,053,748
37 909,587 848,187 61,400 29,794,439 20,205,561
38 909,587 850,657 58,930 30,645,096 19,354,904
39 909,587 853,137 56,450 31,498,233 18,501,767
40 909,587 855,627 53,960 32,353,860 17,646,140
41 909,587 858,127 51,460 33,211,987 16,788,013
42 909,587 860,627 48,960 34,072,614 15,927,386
43 909,587 863,137 46,450 34,935,751 15,064,249
44 909,587 865,657 43,930 35,801,408 14,198,592
45 909,587 868,177 41,410 36,669,585 13,330,415
46 909,587 870,707 38,880 37,540,292 12,459,708
47 909,587 873,247 36,340 38,413,539 11,586,461
48 909,587 875,797 33,790 39,289,336 10,710,664
49 909,587 878,357 31,230 40,167,693 9,832,307
50 909,587 880,917 28,670 41,048,610 8,951,390
51 909,587 883,487 26,100 41,932,097 8,067,903
52 909,587 886,057 23,530 42,818,154 7,181,846
53 909,587 888,647 20,940 43,706,801 6,293,199
54 909,587 891,237 18,350 44,598,038 5,401,962
55 909,587 893,837 15,750 45,491,875 4,508,125
56 909,587 896,447 13,140 46,388,322 3,611,678
57 909,587 899,057 10,530 47,287,379 2,712,621
58 909,587 901,677 7,910 48,189,056 1,810,944
59 909,587 904,307 5,280 49,093,363 906,637
60 909,277 906,637 2,640 50,000,000 0
-대출기간이 12개월이상 시 : 연원리금 = 한달에 내야 하는 상환금(909,587) * 12
-대출기간이 12개월미만 시(6개월) : 연원리금 = 한달에 내야 하는 상환금(8,418,609) * 대출기간
대출 : 5000만원 60개월(대출기간) 3.5이율 일 경우
1년치 상환액을 기준으로 합니다.
1.) 만기일시 연상환액 계산공식
function endAllFunc($src, $rate, $period) {
$endAll_rtn = 0;
if($period > 12) $endAll_rtn = round($src * (1+($rate/100) *($period/12)) / ($period/12));
else $endAll_rtn = round($src * (1+($rate/100) *($period/12)) );
return $endAll_rtn;
}
5000만원 * (1+(3.5/100)) * (60/12)) / (60/12) = 11,750,000원
2) 원금균등분할
//원금균등분할
function psameFunc($src, $rate, $period) {
//이자율변환
$rate = $rate / 100;
//균등분할원금
$o_money = round($src/$period);
$r_money = 0;
for($i=0; $i<$period; $i++ ){
$r_money += ($o_money+round(($src-($o_money*$i)) * $rate/12));
}
$psame_rtn = 0;
if($period > 12) $psame_rtn = round($r_money/$period*12);
else $psame_rtn = round($r_money/$period*$period);
return $psame_rtn;
}
No 상환금 납입원금 이자 납입원금계 잔금
1 979,163 833,333 145,830 833,333 49,166,667
2 976,733 833,333 143,400 1,666,666 48,333,334
3 974,303 833,333 140,970 2,499,999 47,500,001
4 971,873 833,333 138,540 3,333,332 46,666,668
5 969,443 833,333 136,110 4,166,665 45,833,335
6 967,013 833,333 133,680 4,999,998 45,000,002
7 964,583 833,333 131,250 5,833,331 44,166,669
8 962,143 833,333 128,810 6,666,664 43,333,336
9 959,713 833,333 126,380 7,499,997 42,500,003
10 957,283 833,333 123,950 8,333,330 41,666,670
11 954,853 833,333 121,520 9,166,663 40,833,337
12 952,423 833,333 119,090 9,999,996 40,000,004
13 949,993 833,333 116,660 10,833,329 39,166,671
14 947,563 833,333 114,230 11,666,662 38,333,338
15 945,133 833,333 111,800 12,499,995 37,500,005
16 942,703 833,333 109,370 13,333,328 36,666,672
17 940,273 833,333 106,940 14,166,661 35,833,339
18 937,843 833,333 104,510 14,999,994 35,000,006
19 935,413 833,333 102,080 15,833,327 34,166,673
20 932,983 833,333 99,650 16,666,660 33,333,340
21 930,553 833,333 97,220 17,499,993 32,500,007
22 928,123 833,333 94,790 18,333,326 31,666,674
23 925,693 833,333 92,360 19,166,659 30,833,341
24 923,263 833,333 89,930 19,999,992 30,000,008
25 920,833 833,333 87,500 20,833,325 29,166,675
26 918,393 833,333 85,060 21,666,658 28,333,342
27 915,963 833,333 82,630 22,499,991 27,500,009
28 913,533 833,333 80,200 23,333,324 26,666,676
29 911,103 833,333 77,770 24,166,657 25,833,343
30 908,673 833,333 75,340 24,999,990 25,000,010
31 906,243 833,333 72,910 25,833,323 24,166,677
32 903,813 833,333 70,480 26,666,656 23,333,344
33 901,383 833,333 68,050 27,499,989 22,500,011
34 898,953 833,333 65,620 28,333,322 21,666,678
35 896,523 833,333 63,190 29,166,655 20,833,345
36 894,093 833,333 60,760 29,999,988 20,000,012
37 891,663 833,333 58,330 30,833,321 19,166,679
38 889,233 833,333 55,900 31,666,654 18,333,346
39 886,803 833,333 53,470 32,499,987 17,500,013
40 884,373 833,333 51,040 33,333,320 16,666,680
41 881,943 833,333 48,610 34,166,653 15,833,347
42 879,513 833,333 46,180 34,999,986 15,000,014
43 877,083 833,333 43,750 35,833,319 14,166,681
44 874,643 833,333 41,310 36,666,652 13,333,348
45 872,213 833,333 38,880 37,499,985 12,500,015
46 869,783 833,333 36,450 38,333,318 11,666,682
47 867,353 833,333 34,020 39,166,651 10,833,349
48 864,923 833,333 31,590 39,999,984 10,000,016
49 862,493 833,333 29,160 40,833,317 9,166,683
50 860,063 833,333 26,730 41,666,650 8,333,350
51 857,633 833,333 24,300 42,499,983 7,500,017
52 855,203 833,333 21,870 43,333,316 6,666,684
53 852,773 833,333 19,440 44,166,649 5,833,351
54 850,343 833,333 17,010 44,999,982 5,000,018
55 847,913 833,333 14,580 45,833,315 4,166,685
56 845,483 833,333 12,150 46,666,648 3,333,352
57 843,053 833,333 9,720 47,499,981 2,500,019
58 840,623 833,333 7,290 48,333,314 1,666,686
59 838,193 833,333 4,860 49,166,647 833,353
60 835,783 833,353 2,430 50,000,000 0
총상환금 : 상환금을 모두 더한값(원금+총 이자)
-대출기간이 12개월이상 시 : 연원리금 = 총 상환금 / 대출기간(60) * 1년(12)
-대출기간이 12개월미만 시 : 연원리금 = 총 상환금
3) 원리금균등상환
//원리금 균등 상환공식
function isameFunc($src, $rate, $period) {
//이자율변환
$rate = $rate / 100;
//src-원금; rate-이율; period-기간;
$s_rate = 1 + ($rate/12);//원금증가율
$o_money = $src * ( 1 - $s_rate) / ( 1 - pow($s_rate,$period));//초회원금
$r_money = $src * $rate / 12; //초회이자
$iSame_rtn = 0;
if($period > 12) $iSame_rtn = round(($o_money + $r_money) * 12) ; //년 상환금액
else $iSame_rtn = round(($o_money + $r_money) * $period) ; //년 상환금액
return $iSame_rtn;
}
No 상환금 납입원금 이자 납입원금계 잔금
1 909,587 763,757 145,830 763,757 49,236,243
2 909,587 765,987 143,600 1,529,744 48,470,256
3 909,587 768,217 141,370 2,297,961 47,702,039
4 909,587 770,457 139,130 3,068,418 46,931,582
5 909,587 772,707 136,880 3,841,125 46,158,875
6 909,587 774,957 134,630 4,616,082 45,383,918
7 909,587 777,227 132,360 5,393,309 44,606,691
8 909,587 779,487 130,100 6,172,796 43,827,204
9 909,587 781,767 127,820 6,954,563 43,045,437
10 909,587 784,047 125,540 7,738,610 42,261,390
11 909,587 786,327 123,260 8,524,937 41,475,063
12 909,587 788,627 120,960 9,313,564 40,686,436
13 909,587 790,927 118,660 10,104,491 39,895,509
14 909,587 793,227 116,360 10,897,718 39,102,282
15 909,587 795,547 114,040 11,693,265 38,306,735
16 909,587 797,867 111,720 12,491,132 37,508,868
17 909,587 800,187 109,400 13,291,319 36,708,681
18 909,587 802,527 107,060 14,093,846 35,906,154
19 909,587 804,867 104,720 14,898,713 35,101,287
20 909,587 807,217 102,370 15,705,930 34,294,070
21 909,587 809,567 100,020 16,515,497 33,484,503
22 909,587 811,927 97,660 17,327,424 32,672,576
23 909,587 814,297 95,290 18,141,721 31,858,279
24 909,587 816,677 92,910 18,958,398 31,041,602
25 909,587 819,057 90,530 19,777,455 30,222,545
26 909,587 821,447 88,140 20,598,902 29,401,098
27 909,587 823,837 85,750 21,422,739 28,577,261
28 909,587 826,237 83,350 22,248,976 27,751,024
29 909,587 828,647 80,940 23,077,623 26,922,377
30 909,587 831,067 78,520 23,908,690 26,091,310
31 909,587 833,497 76,090 24,742,187 25,257,813
32 909,587 835,927 73,660 25,578,114 24,421,886
33 909,587 838,357 71,230 26,416,471 23,583,529
34 909,587 840,807 68,780 27,257,278 22,742,722
35 909,587 843,257 66,330 28,100,535 21,899,465
36 909,587 845,717 63,870 28,946,252 21,053,748
37 909,587 848,187 61,400 29,794,439 20,205,561
38 909,587 850,657 58,930 30,645,096 19,354,904
39 909,587 853,137 56,450 31,498,233 18,501,767
40 909,587 855,627 53,960 32,353,860 17,646,140
41 909,587 858,127 51,460 33,211,987 16,788,013
42 909,587 860,627 48,960 34,072,614 15,927,386
43 909,587 863,137 46,450 34,935,751 15,064,249
44 909,587 865,657 43,930 35,801,408 14,198,592
45 909,587 868,177 41,410 36,669,585 13,330,415
46 909,587 870,707 38,880 37,540,292 12,459,708
47 909,587 873,247 36,340 38,413,539 11,586,461
48 909,587 875,797 33,790 39,289,336 10,710,664
49 909,587 878,357 31,230 40,167,693 9,832,307
50 909,587 880,917 28,670 41,048,610 8,951,390
51 909,587 883,487 26,100 41,932,097 8,067,903
52 909,587 886,057 23,530 42,818,154 7,181,846
53 909,587 888,647 20,940 43,706,801 6,293,199
54 909,587 891,237 18,350 44,598,038 5,401,962
55 909,587 893,837 15,750 45,491,875 4,508,125
56 909,587 896,447 13,140 46,388,322 3,611,678
57 909,587 899,057 10,530 47,287,379 2,712,621
58 909,587 901,677 7,910 48,189,056 1,810,944
59 909,587 904,307 5,280 49,093,363 906,637
60 909,277 906,637 2,640 50,000,000 0
-대출기간이 12개월이상 시 : 연원리금 = 한달에 내야 하는 상환금(909,587) * 12
-대출기간이 12개월미만 시(6개월) : 연원리금 = 한달에 내야 하는 상환금(8,418,609) * 대출기간
반응형
'PHP' 카테고리의 다른 글
PHP Zend Opacache 설치 (0) | 2024.05.10 |
---|---|
PHP의 php.ini 설정에서 register_globals = on/off 차이 (0) | 2018.09.14 |
form utf-8 -> euc-kr 로 변환하여 전송 post php/asp (0) | 2018.09.12 |
[이니시스/PG] Mobile 모듈 붙이기 (0) | 2018.09.12 |
php 상에 curl 라이브러리가 설치되어야 사용가능한 기능 (0) | 2018.09.12 |