If you're deciding where to keep cash in retirement, your money is already sitting in one of four places. All four are safe, and they're nowhere close on what they pay. On a $100,000 balance, the gap between the worst option and the best one is over $4,000 a year. There's a catch. The option paying the highest rate today is the last place you want money you plan to spend soon.

Number four: the everyday bank account

The national average savings account pays 0.38% right now, and standard savings accounts at big national banks can pay as little as 0.01%. On $100,000, the national average earns you $380 a year. At the bottom of that range, you get a single $10 bill.

Cash at a brokerage is worth checking tonight, because it goes one of two ways depending on the firm. At Fidelity and Vanguard, uninvested cash drops automatically into a money market fund holding short-term government debt, paying about 3.3% to 3.6%. At Schwab, the default is a bank sweep paying 0.01%. The money market funds at the same firm pay about 3.3%, but you have to buy them yourself. So $100,000 in the default sweep earns $10 a year, and the same money moved into the firm's money market fund on the same day earns $3,300. The firm earns more on that cash than it pays you. Nobody moves it for you, and your statements won't warn you.

A checking account is still the right home for money going out this month. You're paying for immediate access there. The trouble starts when six times that amount sits untouched for three years in an account opened at a rate that was competitive that day, while the Fed cut rates six times and nobody told you.

Number three: Treasury bills and CDs

These are the only two options on the list that let you lock in a rate. A T-bill is a loan to the U.S. Treasury for a set number of weeks, at a rate fixed the day you buy it. Yields run from 3.65% for a four-week bill up to 3.82% for a full year. The minimum purchase is $100, at your brokerage or directly from the Treasury. Stagger several with different end dates and you have a ladder, with cash maturing every few months.

A certificate of deposit is the bank equivalent. Top six-month CDs pay around 4.15%, and top one-year CDs hit 4.25% to 4.3%. The word "top" is doing real work there, since the FDIC national average one-year CD pays just 1.71%. The CD your local branch offers and the best CDs online are barely the same product.

They rank third because your money is locked up. If you need cash early, you either sell the bill at market prices or break the CD and pay an interest penalty. For spending cash, access matters more than a sliver of extra yield. Locking a rate wins for cash you're certain you won't touch for a year or more. The trade-off is that if rates rise while you're locked in, you miss the increase.

Number two: money market funds

A government money market fund holds Treasuries and short-term government paper. It's about the most boring asset at a brokerage, which is exactly the point. Vanguard, Fidelity and Schwab all pay roughly 3.3% to 3.6% on theirs right now.

The main difference from a bank account is insurance. A money fund is an investment fund. It isn't a deposit, so it can't carry FDIC coverage, and it falls under SIPC instead. If your brokerage goes bankrupt, SIPC covers up to $500,000 in securities and cash to restore your assets. If the fund itself drops in value, SIPC does nothing. It covers the institution failing and leaves the investment's value alone.

Money funds do carry a tax perk. Treasury interest is exempt from state income tax, which adds about 0.2% to your effective yield in a 5% state, passed through in proportion to the Treasuries the fund holds. They take second place because they lack deposit insurance, and because at some firms you have to buy them by hand every time new cash lands.

Number one: high-yield savings accounts

The simplest tool on the list takes the top spot. Top high-yield savings accounts pay 4% to 4.21% right now. On $100,000, that's roughly $4,200 a year, against $10 in a 0.01% sweep. It's FDIC insured up to $250,000 per depositor per bank, money moves back to checking in a day or two, and there are no maturity dates to manage. A one-year CD might pay a fraction more on paper today. The high-yield account still wins because it's fully insured and fully spendable with zero maintenance.

One variable flips the order. These rankings assume a regular taxable account. Inside a traditional IRA, Roth IRA or 401(k), bank savings accounts usually aren't available, and the state tax exemption doesn't matter because growth is already tax-deferred or tax-free. There, the money market fund takes first place by default.

How much cash to hold

Too little cash creates stress, and too much raises the chance a retirement plan fails. A solid sizing framework from T. Rowe Price uses two layers. The first is an everyday buffer of six to 12 months of living expenses in liquid cash. The second is a bear market cushion of one to two years of living expenses beyond predictable income like Social Security or a pension. That range comes from recovery times. The tech crash lasted about two and a half years and the 2008 financial crisis about a year and a half, and a portfolio of 60% stocks and 40% bonds recovered from both within two years. The cushion covers the window where selling depressed stocks would do permanent damage.

Put the layers onto the ranking and each account gets a job. This month's bills live in checking. Six to 12 months of spending plus a short-term cushion go in the high-yield savings account. The part of the cushion you know you won't touch for at least 12 months goes into T-bills and CDs to lock in the yield.

More isn't safer. A researcher at IESE Business School analyzed 115 years of market data across 21 countries and found that in U.S. history, setting aside one year of portfolio withdrawals in cash performed better than holding two, three or five years. At five years of cash, the probability of running out of money jumped from under 10% to over 25%. Cash keeps you from selling stocks when they're down, and too much of it keeps you from holding stocks while they grow. Lean toward the low end of the range if you have strong baseline income, and save the full two years for situations with very little guaranteed income coming in.

The cushion is sized on the gap between what you spend and what arrives as guaranteed income. Say your lifestyle costs $60,000 a year and Social Security pays $3,000 a month, or $36,000 a year. Your gap is $24,000, so a full two-year cushion is $48,000. Keep the same $60,000 of spending with no guaranteed income yet, maybe because you retired too early to claim Social Security, and the gap is $60,000. The same cushion now needs $120,000. Add up the income that arrives every month without selling shares, subtract it from what a year of life costs, and that remaining gap is the only job your cash cushion has to handle.