answersLogoWhite

0

How do you calculate APR in PHP?

Updated: 9/14/2023
User Avatar

Wiki User

13y ago

Best Answer

<?php

$month = 360; //How many month you have for payment

$monthlyPayment = 671.96; //Your monthly payment

$moneyBorrowed = 99000; //How much you borrowed

$totalPaid = $month * $monthlyPayment; //Number of months * Monthly payment

$APRequ = $moneyBorrowed / $totalPaid; //Money Borrowed * Total money paid back

$APRMonthly = abs($APRequ-1); //Returns the absolute value of the monthly APR

$APR = $APRMonthly * 12; // Monthly APR to get Yearly APR

echo $APR;

?>

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you calculate APR in PHP?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can someone calculate APR?

Calculating APR can be done either manually or via an online APR calculator. The type of APR you are trying to calculate will determine the method which is used.


How do you calculate apr on an adjustable rate mortgage?

APR on an ARM loan is kind of a strange question... if you wanted to calculate your APR, you could add all the variable interest rates you were charged over the course of a year, then divide that number by 12. Technically, that would be your APR.


How do you calculate APR?

You calculate APR based on your credit score, loan size and term of loan. Typically the shorter the loan life the lower APR you will get . Annual Percentage Rate APR (Annual Percentage Rate) is a standardized term used to compare loans, mortgage loans and credit card rates. It is a compilation of the compound interest, finance charges and lender fees calculated annually. For more detailed information and to use an APR calculator visit the link in related links.


How can you calculate your car loan by myself?

(car loan * APR + car loan) / 12/ amount of years. i think


What is 10 percent in Php 250?

Answer: Php 2510% of Php 250= 10% * Php 250= 0.10 * Php 250= Php 25


Where can I find an efficient PHP function to calculate the working minutes elapsed between two timestamps?

print ($Timestamp1 - $Timestamp2)/60;


What is a php consultant?

PHP Consultant is a Expert PHP Developer who Guide PHP Development Process


How do you convert US dollars to PHP?

Currency exchange rates fluxuate constantly. At the moment (June 2013) you can multiply US dollars by 42 to get a rough estimate of PHP.


What is the default extension that most Web servers use to process php scripts?

PHP files extension is .php


What are semantics in PHP?

In PHP, semantics refer to the meaning of code or how statements are interpreted by the PHP engine. It involves understanding how code functions and interacts with other elements in a PHP script. Proper semantics ensure that the code behaves as expected and follows the established rules of the PHP language.


What is disclosed in APR?

APR is annual percentage rate. That rate would be stated in the APR.


Is php a binary file?

No, PHP is text file with .php extension.