Americans are struggling to save. The median U.S. household currently has about $11,700 put away between bank accounts and retirement savings, according to a recent survey from MagnifyMoney. And young people have much less. Millennials (defined here as those born between 1981 and 1998) hold only about $2,400 in median total savings. That's not going to get you very far, considering that experts say you should have at least three to six months' worth of living expenses in an emergency fund and also be on your way to saving $1 million for retirement. To work toward shorter term goals like an emergency fund, or buying a home, and also make sure you'll be able to retire when you want to, the best thing you can do is to start saving early and take advantage of compound interest, in which any interest earned accrues interest on itself. So, exactly how much should you have saved by the time you hit 30?

What to have saved for retirement

Financial services company Fidelity recommends having the equivalent of your annual salary saved. That means if you earn $50,000 per year, by your 30th birthday, you should have $50,000 socked away. Fidelity notes that this guideline specifically refers to funds you've allocated for retirement, which includes anything in a retirement account such as a 401(k) or Roth IRA, plus any company matches. This can also include money you have invested elsewhere, such as in index funds or with robo-advisers.

Click to enlarge To get there, Fidelity recommends saving 15 percent of your annual income. Make sure to invest these funds instead of leaving them in a traditional savings account. "If you only saved money in an account that got no return, you'd have to save a lot more to reach your goal," Meghan Murphy, a VP at Fidelity, tells CNBC Make It. "If you want to live a lavish life in retirement, you may want to save a little bit more," Murphy adds. "If you're perfectly content hanging out at home in retirement, you may need to save a little bit less." However, 15 percent is still more than many Americans can sock away — and that's okay. "It's something to work towards over time," Murphy says. "Always make sure you're getting that company match, then try to increase your savings by 1 percent annually until you reach that 15 percent." Even if you're only able to contribute $30 per pay period, it's better than nothing. You can also consider putting any windfalls, large or small, directly into savings, such as pay increases, bonuses or cash gifts from family members. "That's an opportunity to say 'I'm going to take this chunk of money and I'm going to put it in an IRA' or 'I'm going to take this bonus and I'm going to put it in my 401(k),'" Murphy says.

What to have saved for emergencies

Experts advise that you build up an emergency fund that contains at least three-to-six months' worth of living expenses as well. Emergency funds can provide a cushion if you're struck by financial disaster, says best-selling author Dave Ramsey. Something is always bound to go wrong, but having rainy day funds will help. "Car blows up. Transmission goes out. You bury a loved one. Grown kids move home again. Life happens, so be ready," Ramsey writes in "The Total Money Makeover." "This is not a surprise." Suze Orman, personal finance expert and best-selling author of "Women & Money," agrees, though she recommends being even more prepared. "You need as much money in the bank that makes you feel secure," she says. "Don't go fooling yourself, 'It's okay, I can charge on a credit card, I can do this.' You should have at least eight months. Not six months, not three months. I'd like to see you have eight months to one year."

How to get started saving