Your 20s aren't typically a time when you're flush with cash. Many 20-somethings survive on low salaries or a hodgepodge of part-time and freelance gigs. Student loans and credit card debt only make things tougher. But if you do have cash to spare, you can amass a six-figure fortune a lot faster than you think.

Suppose you started investing on your 22nd birthday. You earn annual returns of 7% before you take inflation into account, which is a pretty realistic target based on S&P 500 index average returns. By investing $780 a month, you'd have $100,000 by the time you blew out your 30th birthday candles.

A woman celebrates as money rains down on her.

Image source: Getty Images.

Can you really have $100K by the time you're 30?

Of course, investing $780 a month isn't realistic for a lot of people in their 20s. If you don't have a degree in a high-paying field or you're carrying mounds of student loan debt, it may be impossible.

It is easier if you work for a company that matches 401(k) contributions. You don't need to be a math major to know that if you work for a company that matches your contributions dollar for dollar, you could get to $100,000 by age 30 if you invested just $390 each month.

It's also more attainable if you freelance on top of a full-time job or have ninja-level budgeting skills.

But even if you save $780 a month diligently starting on your 22nd birthday, there are no guarantees in investing. If there's another market crash or stocks are sluggish for a few years, you could still fall short of your goal of saving $100,000 by age 30.

What's a realistic goal for your 20s?

People who haven't lived on a starting salary for years often lecture the 20s crowd about the high price of not investing right away. While there are plenty of good reasons to start right away, the truth is that sometimes waiting to invest is the right decision.

Investing usually doesn't make sense if you have high-interest debt, because it's probably costing you more than you'd earn in the stock market -- particularly if you don't get an employer match.

If you don't have emergency savings, stockpiling enough cash to cover at least three months' worth of your basic needs is a must. It's a pretty unsexy goal compared to saving a small fortune at a young age, but it's an essential one.

Cashing out on investments in an emergency can wreck your portfolio. Not only do you risk having to sell while your assets are down, but you could owe taxes and penalties if you have to withdraw retirement funds early.

Rather than aiming for a certain net worth by age 30, a better goal is simply to start investing, even if you can't afford much at first. If you invested $200 a month beginning at age 22 and averaged 7% returns, you'd have more than $25,000 by the time you're 30. That's a solid foundation to build upon. Gradually, you can invest more as your disposable income increases.

How to invest in your 20s

If you work for a company that offers a 401(k) plan, that's a good starting point, even though your investment options will probably be limited. Contribute enough to get the full employer match. Otherwise, investing in a Roth IRA is a good option for beginners.

Your best bet is to avoid picking your own stocks at first and invest in an exchange-traded fund (ETF) because you can automatically invest in hundreds, if not thousands of companies. The best ETFs for people in their 20s are those that track a major stock index. Once you get more comfortable as an investor, you can add individual stocks to your portfolio. 

Don't be discouraged if saving $100,000 by age 30 just isn't possible. You can still retire a millionaire, even if you're broke in your 20s.