How the target deposit is computed
A savings goal has two engines: the money you already have, which grows on its own, and the money you add each month. The first is a lump-sum future value, FV = P x (1 + i)^n. The second is the future value of an annuity due, FV = C x [((1 + i)^n - 1) / i] x (1 + i), because a deposit made at the start of a month earns interest that month. Set the two together equal to the goal and solve for C.
The rate matters here. Banks advertise APY, which already includes compounding, so the tool converts it to a monthly rate with i = (1 + APY)^(1/12) - 1 rather than dividing by 12. At 4.00% APY that gives 0.32737% a month, slightly less than 4 / 12 = 0.3333%, and using the wrong one quietly overstates your balance.
A worked example
Goal $20,000, current savings $5,000, 4.00% APY, 36 months. First the existing balance: $5,000 x (1.0032737)^36 = $5,624.32. That leaves $14,375.68 to come from deposits.
The annuity-due factor for 36 months is ((1.0032737)^36 - 1) / 0.0032737 x 1.0032737 = 38.266. Divide: $14,375.68 / 38.266 = $375.68 a month. Over three years you deposit $13,524 of your own money and interest supplies the remaining $1,476.
Switch to the second mode and the question flips. If $400 a month is what you can actually manage, the tool steps forward month by month and finds you cross $20,000 during month 35 - one month early, with slightly less of your own money in the pot.
Choosing a goal and a place to keep it
The most common targets are an emergency fund of three to six months of essential expenses, a home down payment, and a known one-off such as a car, a wedding or a tax bill. For anything you will spend within about five years, keep it in cash, not the stock market: a 20% drawdown the month before closing on a house is not a risk worth a couple of extra percentage points.
For horizons under a year, a high-yield savings account or a money market fund is usually the right home. For a known date one to five years out, a Treasury bill or a CD maturing just before you need the money locks the rate in, though a CD cashed early typically forfeits three to six months of interest. Bank deposits are FDIC insured to $250,000 per depositor, per bank, per ownership category; credit unions carry equivalent NCUA coverage.
Two practical points. Automate the transfer for the day after payday so the decision is made once rather than monthly. And remember the interest is taxable in the year you earn it - at a 22% marginal rate, a 4.00% APY is closer to 3.1% after federal tax, which is worth building into an ambitious deadline.