Question

What would a compound interest formula look like coded in PHP? The Compound Interest Formula is:...

What would a compound interest formula look like coded in PHP?

The Compound Interest Formula is: ? = ? (1 + ? ? ) ??

Where P = principal amount (the initial amount you borrow or deposit) r = annual rate of interest (as a decimal) t = number of years the amount is deposited or borrowed for. A = amount of money accumulated after n years, including interest. n = number of times the interest is compounded per year

Example: An amount of $1,500.00 is deposited in a bank paying an annual interest rate of 4.3%, compounded quarterly. What is the balance after 6 years?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

FORMULA for compound Interest = A = P (1 + r/n) (nt)

<?php
   $cpy=2;       // No. of times compound interest per year
   $n=7;     // Year
   $p=50;        // Principal
   $ir=20;       // Interest Rate
   $dd = 1+(($ir/$cpy)/100);     //ci = p * (1 + ir/cpy)^(cpy*n)
   $ci = $p*pow($dd,$cpy*$n);
   echo "Compount interest : ".$ci;
?>

Add a comment
Know the answer?
Add Answer to:
What would a compound interest formula look like coded in PHP? The Compound Interest Formula is:...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 14.Compound Interest hank account pays compound interest, it pays interest not only on the principal amount...

    14.Compound Interest hank account pays compound interest, it pays interest not only on the principal amount that was deposited into the account, but also on the interest that has accumulated over time. Suppose you want to deposit some money into a savings account, and let the account earn compound interest for a certain number of years. The formula for calculating the balance of the account afer a specified namber of years is The terms in the formula are A is...

  • c++ and please add tables and everything and make sure program is complete. Write a menu...

    c++ and please add tables and everything and make sure program is complete. Write a menu driven program, which would compute compound interest and a monthly payment for a loan. The user will be given a choice to display the info on the screen or to a filo Menu will be the following Enter (1) to calculate your loan monthly payment Enter (2) to calculate your loan monthly payment & write to a file Tips: Compound Interest Formula A =...

  • Use the compound interest formula to compute the total amount accumulated and the interest earned. $2500...

    Use the compound interest formula to compute the total amount accumulated and the interest earned. $2500 for 5 years at 5% compounded quarterly The total amount accumulated after 5 years is $ (Round to the nearest cent as needed.) The amount of interest earned is $ (Round to the nearest cent as needed.)

  • The principal represents an amount of money deposited in a savings account subject to compound interest...

    The principal represents an amount of money deposited in a savings account subject to compound interest at the given rate. Find how much money will be in the account after the given number of years (Assume 360 days in a year.), and how much interest was earned. Int A P A = Pert n nt 1 + 38) Principal: $10,000 Rate: 5% Compounded: semiannually Time: 5 years A) amount in account: $11,314.08; interest earned: $1314.08 B) amount in account: $12,762.82;...

  • This Question: 1 pt 3 of 17 (0 complete Use the periodic compound interest formula How...

    This Question: 1 pt 3 of 17 (0 complete Use the periodic compound interest formula How much money will you have in 10 years Il you invest $19,000 at a 5.4% annual rate of interest compounded quartery? How much will you have it is compounded monthly of the interest is compounded quarterly, the amount ahter 10 years will be $(Simplity your answer. Round to the nearest cent) of the interest is compounded monthly, the amount after 10 years will be...

  • The principal represents an amount of money deposited in a savings account subject to compound interest...

    The principal represents an amount of money deposited in a savings account subject to compound interest at the given rate. Find how much money will be in the account after the given number of years (Assume 360 days in a year.), and how much interest was earned. 5) 1.9tA= Pert Y= (1. :) - 1 Principal: $3500 Rate: 4.5% Compounded: monthly Time: 4 years amount in account: $4865.38; interest earned: $673.82 amount in account: $4188.85; interest earned: $688.85 amount in...

  • Score: 0 of 1 pt SI 1 of 10 (0 complete) HW Score: 0%, 0 of...

    Score: 0 of 1 pt SI 1 of 10 (0 complete) HW Score: 0%, 0 of 10 Question Help 8.4.5 The principal represents an amount of money deposited in a savings account subject to compound interest at the given rate. A. Find how much money there will be in the account after the given number of years. B. Find the interest eamed. A The amount of money in the account after 2 years is (Round to the nearest hundredth as...

  • How much money should be deposited today in an account that earns 5% compounded semiannually so...

    How much money should be deposited today in an account that earns 5% compounded semiannually so that it will accumulate to $8000 in three years? The amount of money that should be deposited is $ (Round up to the nearest cent.) You deposit $14,000 in an account that pays 5% interest compounded quarterly A. Find the future value after one year B. Use the future value formula for simple interest to determine the effective annual yield. A. The future value...

  • 1. Calculate the compound amount when S1500 is deposited in an account earning an annual interest...

    1. Calculate the compound amount when S1500 is deposited in an account earning an annual interest rate of 5%, compounded monthly, for 18 months. 2, How much money should be invested in an account that earns 6% annual interest, com- pounded monthly, in order to have $15, 000 in 5 years? 3. How much interest is earned on a $2000 deposit for 2 years at a 0.12% monthly interest rate. compounded daily?

  • Problem 1: If you deposit $4000 into an account paying 6% annual interest compounded quarterly, howmuch...

    Problem 1: If you deposit $4000 into an account paying 6% annual interest compounded quarterly, howmuch money will be in the account after 5 years? Problem 2: If you deposit $6500 into an account paying 8% annual interest compounded monthly, how much money will be in the account after 7 years?

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT