I want to buy a house in 3 years. I need to have a down payment of $20,000. How much do I need to have today in order to have that if I can earn 4.5%?

To calculate how much money you need to have today in order to have a down payment of $20,000 in 3 years, taking into account an interest rate of 4.5%, you can use the future value formula for compound interest.

The formula for calculating the future value (FV) of an investment with principal (P), interest rate (r), compounded annually (n) over a period of time (t) is:
FV = P(1+r/n)^(n*t)

In this case, you want to find the present value (P), which is the amount of money you need to have today. Rearranging the formula, we get:
P = FV / (1+r/n)^(n*t)

Let's calculate it step by step:

Step 1: Convert the interest rate to a decimal. In this case, 4.5% becomes 0.045.

Step 2: Plug in the values into the formula:
P = $20,000 / (1 + 0.045/1)^(1 * 3)

Step 3: Simplify the equation inside the parentheses:
P = $20,000 / (1 + 0.045)^(3)
P = $20,000 / (1.045)^(3)

Step 4: Calculate the final result:
P = $20,000 / (1.045)^3
P ≈ $17,119.92

Therefore, you would need to have approximately $17,119.92 saved today in order to have a down payment of $20,000 in 3 years, given an interest rate of 4.5%.