If you have $100 to spare, you may want to consider investing it instead of spending it immediately. Later down the road, your frugality will be rewarded with a nice chunk of cash that you can use when you retire.

Start investing today and a $60,000 investment could turn into a nest egg of $522,000 in 50 years, according to an analysis by The Motley Fool, a financial services company. Even if you don’t have half a century to wait, a $12,000 investment will grow an extra $5700 over the course of 10 years, netting you $17,700. Not a bad return for just $100 a month.

What this all comes down to is compound interest, which is essentially earning interest on top of interest. Calculating that the market returns about 7 percent per year, adjusted for inflation, The Motley Fool explains what this would mean for someone who invests $100 a month:

“That means the $1,200 you invest in year one will be worth $84 more in year two. When year three rolls around, that original sum will gain even more—roughly $90—because the interest from the previous year will grow as well. That might seem like small stuff, but over time, the effects can be astounding.”

You can see this at work with bank accounts that pay interest, but compounding also affects other types of investments, like stocks. Many stocks have dividends, which are payments corporations disburse to investors each quarter—say, 50 cents per share. When you receive dividends, you can reinvest that money, using it to buy new stock shares. Each of those new shares then pays its own dividend, growing your money exponentially over time.

However, the financial service agency says you shouldn’t start investing until you’ve paid off all high-interest debt—like credit card debt—and established an emergency fund with enough money to cover your basic expenses for three months if you happened to lose your job. Once that's settled, you can start putting some of your extra earnings into an investment account, like a 401(k) or IRA. (The company also offers some tips on how to set up a brokerage account, and how to figure out which type of account is best for you.)

Ready to start building up that nest egg? Check out Mental Floss’s 15-minute guide to how you can start investing today.

[h/t The Motley Fool]