How To Calculate Payments in FoxPro

Last reviewed: January 10, 1997
Article ID: Q155692
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b

SUMMARY

The PAYMENT() function in Visual FoxPro allows the user to calculate a payment amount per month based upon a fixed interest rate.

MORE INFORMATION

The following program displays the monthly payment for a 15-year home mortgage based upon an 8-percent interest rate:

nTotal=100000 && total amount borrowed is $100000

nRate=.08/12   && payment is made at the end of each month with fixed
               && interest rate
nPayments=180 && 180 months in 15 year period

cDisplay=MESSAGEBOX("Your monthly payment is" ;

   +" "+"$"+ALLTRIM(STR(PAYMENT(nTotal,nRate,nPayments))))

REFERENCES

Visual FoxPro, Help file, version 5.0; search on: "PAYMENT()"


KBCategory: kbprg kbhowto
KBSubcategory: FxprgGeneral
Additional reference words: 3.00 3.00b kbdse vfoxwin



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.