# Simple Templates

A simple template is created by defining an equation. Each variable in the equation is added as its own row and the entered equation is defined for every variable. In addition, an extra row -- used to define the number of displayed decimal places -- is automatically added to the bottom in its own section.Simple templates can only be comprised of real numbers. For more power and flexibility, see the Advanced Templates section.

Simple template equations can use all of the available math functions, operators and constants. See the Equations section for more details.

Some examples are included below.

## Inflation

**Variables**

- FutureValue: future value after inflation

- PresentValue: present value before inflation

- Inflation: annual inflation rate expressed as a percentage

- Years: number of years between present and future value

**Example**

If a pool costs $5,000, what is the expected cost 5 years from now if the inflation rate is 4%? Enter $5000 for Present Value, 5 for Years and 4 for Inflation. Future Value is $6,083.26.

## Constant Acceleration

**Variables**

- Velocity1: final velocity

- Velocity0: initial velocity

- Acceleration: speed of acceleration. Negative denotes deceleration

- Distance: distance between Velocity1 and Velocity0

**Example**

What is the stopping distance for a car traveling 30 meters per second but decelerating 5 meters per second squared? Enter 0 for Velocity0, 30 for Velocity1, and -5 for Acceleration. The car will stop in 90 meters.

## Home Loan

**Variables**

- Payment: monthly house payment

- Years: number of years to pay off the loan

- IntRate: annual interest rate expressed as a percentage

- LoanAmount: amount of the loan (mortgage)

**Notes**

tvmpmt is a function available that returns the payment. While our equation expects entry in Years, the function expects Periods. Since our payments are monthly this is the number of years times 12 monthly payments.

The last four numbers are constants that define the Future Value, payment periods per year, interest compounding periods per year and whether payments occur at the beginning (1) or end (0) of the period. The Future Value is 0 because that is the ending balance of the loan. This example assumed monthly payments and monthly compounding of interest so 12 is entered for each of these fields. Finally, mortgages are paid at the end of the period.

Payment is negative only for display purposes. tvmpmt returns a negative payment in this case because the payment would be a cash outflow. This is negated since we understand what is an outflow and what is an inflow.

**Example**

What is the monthly payment to pay off a $300,000 mortgage at 6.75% interest over 30 years? Enter 300,000 for LoanAmount, 30 for Years and 6.75 for IntRate. The mortgage (principal and interest) payment is $1,945.79 each month.

## Profit Sharing

if(NetIncome <= 5000000; BasePay * .02; BasePay * .04))

**Variables**

- NetPay: final, monthly net pay including base pay and profit sharing

- BasePay: monthly base pay

- NetIncome: net income earned by the company.

**Notes**

The equation says the following:

- You receive a base pay
- You get no bonus pay if net income is below $1,000,000
- You get a 2% bonus if net income is greater than $1,000,000 but less than or equal to $5,000,000
- You get a 4% bonus if net income is greater than $5,000,000

- The first if statement says if net income is less than or equal to (<=) $1,000,000, add 0 otherwise do the second if statement.
- The second if statement says if net income is less than or equal to (<=) $5,000,000, then add in 2% of the base pay. If it doesn't meet this condition, than net income must be larger since we took care of all other conditions. Add in 4% of base pay instead.
- Note that nested if statements read from left to right. If the first criteria is true, the solver will not continue to the false statement. Due to this we do not need the second if statement to say "if(NetIncome > 1000000 && NetIncome <= 5000000..." as the second if statement won't be reached unless the first is false.

**Examples**

If the base pay is $3,000 per month and net income was $700,000, what would be your pay? Enter 3,000 for BasePay and 700,000 for NetIncome. Your NetPay is $3,000.

If the base pay is $3,000 per month and net income was $1.25 million, what would be your pay? Enter 3,000 for BasePay and 1,250,000 for NetIncome. Your NetPay is $3,060.

If your base pay is $3,000 per month and net income was $6 million, what would be your pay? Enter 3,000 for BasePay and 6,000,000 for NetIncome. Your NetPay is $3,120.