It’s one of the oldest pieces of advice out there, but it’s one of the hardest to actually follow: Make a budget — and stick to it.

Reports have shown only 39 percent of Americans say they are able to cover a $1,000 unplanned expense — and one-third of households reported that they did have an unplanned expense, such as a car repair or a dental emergency, last year. And 78 percent of Americans say they are extremely or somewhat concerned that they will not have enough money for retirement. The good news? Putting together a simple budget to help improve both those situations is not difficult. Here are some tips:

Step 1: Gather the numbers.

To create a budget you can live with, examine your habits.

Think of yourself like a business. Essentially, you’re trying to figure out how much you have left over — your “profit,” so to speak — once you add up everything that comes in and goes out.

Use your paystub to calculate how much you take home after subtracting health insurance, your 401(k), and taxes. That number will tell you how much money you have to cover your expenses (and put together some savings) in any given year.

Next, determine your expenses. Think through how much you spend on housing; food; your daily commute; and other recurring costs, like a monthly gym fee.

Now, subtract those recurring costs from your take-home pay. This is the amount you have for Step 2.

Step 2: Figure out your biggest unpredictable costs, and set a limit.

Now that you have your recurring costs, be honest with yourself — figure out how much you usually spend on extra things like going out to eat, traveling, or entertainment. Go over your credit card statements to identify as many of these costs as possible. 

Now, how much do you have left of that number you tallied at the end of Step 1?

Are you seeing lots of your favorite coffee charges on there? Or are you racking up bills at your favorite cosmetic shop? Chances are, you’ll find a pattern of small purchases that really add up at the end of the month. Your budget is where you will map that out.

Here’s the key: Once you know how much you are spending on average, it’s time to set a limit. A successful budget works directly with your current habits to set reasonable limits of what you can spend each month.

To stay with the coffee example, imagine you set a budget of $70 a month for coffee. Divide $70 by the cost of your favorite cup to determine how many coffees you can have.

Step 3: Prioritize.

Once you know your spending limits, you will need to prioritize. If you absolutely must have a coffee each day, that’s fine. Perhaps you can find other places to cut back or look for cheaper options, like choosing a regular coffee instead of a latte, or brewing your own.

It’s one thing to know that it’s important to save money and quite another to make room in your budget to do it. We tend to think saving is hard because it means giving up things we love. But if you’ve accurately mapped out your costs and your assets, you know exactly how much is left to save — and what’s left over for you to enjoy.

It’s all in the budget.