Saving money is a lifelong skill, and it's one everyone needs to learn. Finances might not be the most exciting topic to learn about. But without a basic knowledge of how to save money and prepare for retirement, you're more likely to struggle financially and risk retiring broke.

If your financial literacy skills aren't the strongest, though, you're not alone. Three-quarters of American adults over the age of 60 failed a basic financial literacy quiz, according to a survey from the American College of Financial Services, and fewer than 1% scored an A on the quiz.

However, even if you're struggling with your money or don't know how to start saving more, that doesn't mean you can't start building a strong financial foundation. But to save enough for retirement, you'll need to jump-start your savings sooner rather than later. For a healthier financial future, there are a few money habits you should aim to master by age 40.

Large pile of $100 bills

Image source: Getty Images

1. Create financial goals (and stick to them)

Without goals, you have nothing to aim for. And if you're blindly saving whatever you can and hoping for the best, it's impossible to say whether you're on track. Then if you're not on track, you may not discover it until it's too late to do anything about it.

You may have a variety of financial goals, such as saving for a down payment on a house, buying a new car, establishing an emergency fund, and taking that dream vacation. But for most people, the biggest goal is saving for retirement.

Saving for retirement is a daunting task, partly because it's tough to know just how much you need to save. Unlike a car or a house, there's no set price tag on retirement. It's also a highly individual goal, so what you need to save may be wildly different than what your coworkers or friends need to save.

To get a general idea of your retirement goal, input your information into a retirement calculator. Be as accurate as possible here, particularly when it comes to how much you expect to spend each year in retirement. You may even want to create a retirement budget beforehand: The amount you'll spend each year in retirement determines how much you'll need to save, so make sure you're honest with yourself about those expenses.

Once you have a goal in mind, create a plan to get there, and stick to it. Your retirement calculator may also tell you how much you should be saving each month to reach your goal by the time you retire, so that will give you a monthly goal to strive for. If you can't find that much cash to put toward retirement, you may need to make some sacrifices in other areas of your budget -- because the longer you put off saving, the harder it will be to catch up.

2. Increase your retirement contributions on a regular basis

In your 20s and 30s, it's important to set at least some money aside for retirement. But saving for the future isn't a "set it and forget it" type of scenario; it's important to check in on your savings every so often and make adjustments to save more as circumstances permit.

It's especially vital to have this habit of boosting your retirement savings down by the time you turn 40. That's because your 40s will likely be some of your peak earning years, making them a good time to supercharge your retirement savings. Every time you earn a raise, receive a bonus, or start a new job with a higher salary, contribute a little more to your retirement fund. These adjustments don't need to be major, but increasing your savings a little bit each year can add up over a couple of decades.

One of the best ways to increase your retirement contributions effortlessly is to save a certain percentage of your salary. Then as you earn more money, you'll automatically be saving more. If you can, you might also increase the percentage of income you're setting aside to boost your savings even more.

For example, say you're earning $50,000 per year and your goal is to save $500 per month -- 12% of your salary. Let's also say you earn a raise down the road and start earning $55,000 per year. By continuing to save 12% of your salary, you instantly increase your savings to $550 per month. If you have some extra cash each month, you might also choose to increase your contribution rate to 15% of your salary, or around $687 per month. These changes may seem minor, but little boosts in savings can add up -- especially if you keep making adjustments every few years.

3. Automate your bills

Nearly half of Americans at least sometimes pay their bills late, a survey from Aite Group found, and just over 60% say they don't automate their payments.

A late payment here and there won't ruin your finances, but if you make a habit of not paying your bills on time, it can create long-term damage. One of the key components of your credit score is your payment history, so repeated late payments can cause your score to plummet. A low credit score can lead to a host of problems, including higher interest rates on loans -- which eat away at your disposable income and make it harder to save.

An easy way to combat late payments, however, is to automate paying your bills. This ensures they're paid on time every month, easily avoiding any late fees or dings to your credit score. It also makes bill-paying one less thing you have to worry about each month, so you can focus on more important financial tasks.

In a similar vein, you may also choose to automate your retirement savings to take one more task off your plate. If you have a 401(k), you may even be able to transfer a portion of each paycheck straight to your retirement fund, so you'll never see that money in your bank account -- making it less tempting to spend it before you can save it. If you're using an individual retirement account to save, you can still transfer a set amount from your bank account to your IRA, ensuring that you reach your saving goals each month.

Managing your finances is hard work, but it's one of the most important skills you can learn if you want to enjoy a financially healthy future. By taking baby steps and mastering a few easy money habits, you can set yourself up for long-term success.