People are generally confused about what to do with excess money. The words we use to talk about this are not helpful. Most people think of saving money by putting it in a bank. However, the key to financial success is investing money by putting it in a 401(k), an individual retirement arrangement (IRA), and a taxable brokerage account to buy stocks (real estate is another option if you have the requisite expertise).

However, saving money is important. You want to have savings to cover your expenses and unexpected financial needs. But, as your financial capital grows, an increasing proportion of it should be in stocks. This is why sound financial advice advises establishing an “emergency fund,” which is savings to cover several months of living expenses, before you start investing. Another prerequisite to investing is eliminating high-interest debt, such as credit cards.

Typically, people talk about a savings account being “safe” and investing being “risky.” In one sense, this is true. With a savings account, you can’t wind up with fewer dollars than you deposited, while an investment in stocks can result in losing money. However, in the long run, avoiding investing is the truly risky maneuver. Unfortunately, half of Americans avoid investing entirely, which is financially ruinous in the long term.

The best way to invest is to buy the whole stock market via a mutual fund commonly known as an “index” fund. Instead of picking stocks or market sectors, you can invest in the whole U.S. publicly traded stock market by purchasing shares in an index fund that invests in the approximately 3,500 publicly traded U.S. companies, proportionate to their value (that is, their market capitalization). Apple is the most valuable company, so as of this writing, about 2.9% of your money will be invested in Apple, 2.7% in Microsoft, 2.5% in Microsoft, 2.4% in Google, … 0.8% in Home Depot, 0.7% in Boeing, and so on.

Index funds of the whole U.S. stock market have very low fees and a high probability of greatly increasing in value over the long term (15 years or more). Although in any particular year, there is about a 25% chance of losing money and a 75% chance of making money, over longer spans the chance of losing money approaches 0%.

Additionally, it is sensible to hold an index fund of the “international” stock market; that is, all publicly traded companies not based in the United States (for example, the Vanguard Total International index). The largest of the approximately 6,100 stocks in this fund are presently Tencent (1.15%), Nestle (0.95%), Alibaba (0.8%), Samsung (0.8%), and HSBC bank (0.75%). Of the proportion of your money invested in stocks, many people suggest putting about 80% in the U.S. market and 20% in the international market. Others recommend 100% in the U.S. market (most notably Warren Buffett) and others recommend a 50%/50% split. Considering the whole earth, the U.S. market’s valuation is about 50% of the earth and all other countries are about 50%.

Many people think of investing as “gambling.” This is not correct. The saying, “the house always wins” is accurate; when you gamble, be it in a lottery, casino, or buying scratch-off tickets, you are more likely to lose money than gain. As you gamble more and more, your probability of making money approaches 0%. Investing is fundamentally different, because the odds are in your favor—your probability of making money approaches 100% the longer you stay invested in the whole stock market.

Not investing is risky because over time, you are going to wind up with far less money as compared with someone who invests in index funds of the whole U.S. stock market and optionally/additionally the international stock market. When we talk of equities (stocks) being “risky,” if referring to the whole stock market, this risk is time-limited. Over decades, the riskier path is actually sticking to “safer” choices like savings accounts, money market accounts, certificates of deposit, and bonds.

With investing, starting earlier is better, and investing for retirement is critical. Your 401(k) and IRA can be in a money market account earning next to nothing, or in index funds of the whole U.S. and international stock markets earning large, tax-deferred or tax-free gains. The choice is yours. (Although some 401[k]s do not offer an index fund of the whole U.S. stock market, in these cases it is reasonable to invest your 401[k] contributions in a Standard and Poor’s 500 [S&P500] index fund.)

Fidelity, Vanguard, Charles Schwab, and TIAA are the largest brokerage firms where you would select to buy an index fund with low fees (i.e., 0.25% per year or lower) for your taxable brokerage account and retirement accounts. In addition to investment returns, retirement investing is important because you are offered tax reductions and credits for doing so, but you can only invest up to a certain amount each year, so if you start later, you can’t go back and contribute for previous years.

Another benefit is that the so-called “unearned” income received via investing (namely, capital gains) is advantaged over earned wages in other ways, even in a typical taxable brokerage account—for example, you don’t have to pay Social Security or Medicare taxes on your capital gains, and you can choose when to receive the capital gains by cashing out in a tax year that is advantageous to you (known as “tax gain harvesting”).

One of the biggest financial risks for young and middle-aged adults is not investing. Although two-thirds or more of Americans do not understand investing and other basic financial concepts, the information can be learned on your own, from websites and books. However, weeding out widespread bad advice is difficult. Many financial professionals are trying to sell you on managing your money with them, for their own personal gain rather than your gain. Many financial pundits talk about investing in particular stocks to the public’s detriment, because it is simply boring to only talk about investing in the entire stock market, despite being preferable.

You can learn about finance and wisely invest in index funds of the whole stock market without anyone’s help, but you must put forth time and effort. Hiring a “wealth manager” or financial advisor can be dangerous to your financial health; you must be sure they are acting in your best interests, rather than for their own profit. Demanding they conform to the “fiduciary standard,” not the “suitability standard,” is a good start. Regardless of whether you hire a financial advisor, educating yourself is critical, and will pay off massively over the course of your life.