Generally speaking, stocks provide more long-term growth, but they can be volatile. Bonds, on the other hand, tend to be more stable but offer relatively little growth. As a result, most people should put their money in a mix of both — but how much of each depends on your age and how soon you plan to retire and begin withdrawing your savings.

Cash or cash equivalents like money-market funds pose very little risk but offer very little return. Beyond a modest supply of emergency funds, you might not need cash in your portfolio at all until you’re about to stop working.

In general, the younger you are, and the further you are from retirement, the more your portfolio ought to be weighted toward stocks. The reason has to do with one’s ability to withstand and recover from big stock market declines.

Younger folks, with a lot of working years ahead, can generally count on a steady stream of future earnings long into the future. As a result, money they invest in the near term represents a relatively small percentage of their lifetime earnings. And their future income stream — which some economists actually encourage us to think of as playing a bond-like role in our overall financial portfolio — will likely dwarf the size of any stock market losses incurred early on.

This isn’t true for everyone, of course — only those who can reasonably expect to maintain steady income well into the future. Entrepreneurs, by contrast, tend to have highly unpredictable incomes, in which case they ought to tilt their portfolios toward bonds.

The upshot? Until retirement is imminent — at which point a more customized financial plan is in order — most people can follow a simple rule of thumb: Subtract your age from 100. The result is the percentage of your savings that should be invested in stocks. The rest should be in bonds. For instance, if you’re 40 years old, you should have 60 percent of your funds in stocks and 40 percent in bonds.

Then you can make some adjustments depending on your circumstances and attitudes. For example, increase your stock allocation by one percentage point for every year you expect to work past age 65. Another: If you are fairly comfortable with risk, you might subtract your age from 110 instead of 100.

Once a year, you’ll want to repeat the calculation and “rebalance” your portfolio — especially because market forces might have thrown your stock-bond mix out of whack in the interim. If stocks had a great year and bonds a lousy one, for example, your percentage of stocks will have grown too large.

If all this sounds like more than you’re likely to tackle on an annual basis, consider placing your money in a target-date fund, which will automatically adjust your stock-bond mix as you get closer to retirement. All you have to do is determine when you plan to retire. Target-date funds tend to be too heavy on stocks for those approaching retirement, however; but that, again, is when you should be developing a more tailored financial plan anyway.

Another solid one-stop option is a low-priced balanced mutual fund. These funds generally mix stocks and bonds in about a 60/40 ratio — a bit conservative if you’re in your 20s or 30s, but in the right ballpark if you’re in your 40s or 50s.