When you borrow money from a lender, you do it in three steps: how much you borrow, how long you want to take to repay the loan, and the interest rate on the loan. You will determine how much money you borrow and how long you want to take to pay it back. The lender will determine what the interest rate will be. The formula for calculating a loan payment is useful for the borrower to doublecheck his monthly payment, or even to figure what the monthly payment will be for a future loan.
Considerations

This loan payment formula may be used only for standard loans. There are special types of loans issued by banks or private lenders that may use their own methods and formulas, such as loans with the entire principals due at the end in balloon payments. However, if you know your principal, length of loan and annual percentage rate, you may use this formula.
What is Principal?

The principal is another name for the amount of money you borrowed. For example, if you received a loan for $200,000, the principal on the loan is $200,000. In the formula, the principal will be designated by the letter "P."
What is the Length of the Loan?

The length of your loan is the amount of time in which you intend to repay the loan. For example, if you have a $200,000, 30year loan, that means you intend to repay the loan over a 30year span. In the formula, because you are determining your monthly payment, the length of the loan must be broken down to months. For a 30year loan, the number of months is 360. In the formula, the number of months will be designated by the letter "n."
What is My Interest Rate?

Your interest rate is normally given to you in the form of an annual percentage rate, or APR. This is how the lender makes money; you pay back the lender more money than you borrowed so it makes the loan worth the lender's time.
Because you are finding your monthly payment, you need to reduce the APR to a monthly percentage rate. To accomplish this, divide your APR by 12, the number of months in a year. For example, if you have a $200,000, 30year loan at 11 percent interest, your monthly percentage rate is .11/12=.0091667. In the formula, the monthly percentage rate is designated by the letter "r."
The Formula

The formula for calculating a loan payment is:
Monthly payment = P [{r(1+r)^n}/{(1+r)^n1}]
An explanation of the symbols:
^ : This denotes an exponent; in the equation, it would read, "One plus r raised to the power of n." If we were to only use numbers, 2^2 would read, "Two raised to the power of two," which equals 4.
 : This denotes multiplication; since the letter "x" is sometimes used as a variable, the asterisk symbol is used to eliminate any confusion.
To solve the equation, follow PEMDAS order: parentheses, exponents, multiplication, division, addition, subtraction.
Example of Calculating a Loan Payment

Let's say we have a 30year, $200,000 loan with an 11 percent APR.
n = 30*12 = 360 months
r = .11/12 = .0091667
P = $200,000Monthly payment = P [{r(1+r)^n}/{(1+r)^n1}]
Plugging those numbers into the equation gives us this, one step at a time:
Monthly payment = 200,000 [{.0091667(1+.0091667)^360}/{(1+.0091667)^3601}]
Monthly payment = 200,000 [{.0091667(1.0091667)^360}/{(1.0091667)^3601}]
Monthly payment = 200,000 [{.0091667(26.708415)}/{(26.7084151}]
Monthly payment = 200,000 [{.0091667(26.708415)}/{25.708415}]
Monthly payment = 200,000 * [{0.244827}/{25.708415}]
Monthly payment = 200,000 * [0.0095232]
Monthly payment = $1,904.65
References
 Photo Credit numbers image by Albert Lozano from Fotolia.com