House down payment, wedding, emergency fund, sabbatical — whatever it is, tell it what you're saving for and it'll do the math both directions.
For goals under ~5 years away, most people use a high-yield savings rate here (4-5%) rather than stock-market return assumptions — see the note below.
Use "I know my deadline" when the date is fixed — a wedding, a lease renewal, a trip — and you need to know what to set aside each month to be ready. Use "I know my monthly amount" when the amount is what's fixed (say, whatever's left in your budget after bills) and you want to know when you'll actually hit the goal.
For goals under about five years away, a high-yield savings account is generally preferred over investing in stocks, since you need the money to be there on schedule and can't safely ride out a market downturn in that timeframe.
Most planners suggest keeping a down payment fund in cash or a high-yield savings account rather than the stock market if you plan to buy within the next few years, since a market drop right before your purchase could set your timeline back significantly.