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 you need to have today in order to have a down payment of $20,000 in 3 years, you can use the concept of compound interest. Compound interest is the interest that is calculated on the initial amount (known as the principal) as well as on any previously accumulated interest.

To calculate this, you can use the formula for compound interest:

A = P (1 + r/n)^(nt)

Where:
A = the future value of the investment
P = the principal amount (the initial amount you invest)
r = the annual interest rate (expressed as a decimal)
n = the number of times that interest is compounded per year
t = the number of years

In your case, the principal amount (P) is the amount you need to have in 3 years, which is $20,000. The annual interest rate (r) is 4.5% or 0.045 (expressed as a decimal). As for compounding frequency (n), since you haven't provided any specific information, let's assume it compounds annually. Finally, the number of years (t) is 3.

Plugging the values into the formula, we get:

A = 20,000(1 + 0.045/1)^(1*3)
A = 20,000(1 + 0.045)^3
A = 20,000(1.045)^3

Calculating the result:

A = 20,000 * 1.1447
A = $22,894.00 (rounded to the nearest dollar)

Therefore, you would need to have approximately $22,894.00 today in order to have a down payment of $20,000 in 3 years, assuming an annual interest rate of 4.5% compounded annually.