Home >Backend Development >PHP Tutorial >How to communicate between PHP program and server_PHP tutorial
"Integral savings" is a common investment method among working-class people. This requires calculating the future value of the investment to decide whether to choose a certain savings method.
(1) Function decomposition
The FV function returns the future value of an investment based on a fixed interest rate and equal installment payment method.
Syntax: FV(rate,nper,pmt,pv,type)
Rate is the interest rate of each period; Nper is the total investment period, that is, the total number of payment periods of the investment; Pmt is the total number of payment periods for each period The amount payable in the period, its value remains unchanged throughout the annuity period; Pv is the present value, that is, the amount of money that has been recorded from the beginning of the investment, or the cumulative sum of the current values of a series of future payments; Type is a number 0 or 1, used to specify whether the payment time of each period is at the beginning or end of the period.
(2) Example Analysis
Create a new worksheet and enter "investment interest rate", "investment period", "investment amount" and "investment amount" in cells A1, B1, C1 and D1 respectively. "Account Initial Amount". Assume that the wife creates a new account and deposits 300 yuan at the end of each month, with an annual interest rate of 2.1% (that is, monthly interest of 0.00175), and deposits continuously for 5 years. She can enter "0.00175", "60", and "500" in cells A2, B2, C2, and D2 respectively. ” and “1”.
Then select cell E2 and enter the formula "=FV(A2,B2,-C2,D2,1)" and press Enter to get the total maturity principal of the investment as "¥18,994.67". "-C2" in the formula means that the funds are spent. You don't need to add a negative sign before "C2", so the calculated result will be a negative value.
If the husband also has a "small deposit and lump sum" account, and deposits 200 yuan at the beginning of each month, the annual interest is 1.28% (that is, the monthly interest is 0.001667), and the deposit has been continued for 3 years, he can deposit it in cells A3, B3, C3, and D3 Enter "0.001667", "36", "200" and "0" respectively. Then copy the formula in cell E2 to cell E3 (point the cursor to the drag handle of cell E2, and when the black cross cursor appears, drag down one cell) to know the due principal of the investment. The total is "¥7,426.42".
Tip: The above calculation results include principal and interest, but do not include interest taxes and other fees.