The average American's retirement savings varies widely by age.

This article was updated on July 19, 2016.

We start off doing so well, then we lose our way. If forced to sum up the average American retirement savings by age, that would be the takeaway lesson.

Getting off to a good start is crucial, as the money you invest in your 20s has four decades to compound. And in this respect, the average American is actually doing a great job. But as you'll see, starting in our late thirties, we start to fall woefully behind, and it sets us up for tight times in retirement.

The data speaks volumes

I'll get one thing out of the way at the start: there is no single source of data that gives an all-encompassing view of where the average American's retirement savings stands. But we can piece together data from reliable sources and at least get a ballpark idea of where we're at as a nation.

TransAmerica's 16th Annual Retirement Survey is a good starting point. The company culled data from over 4,500 online interviews to let us know what the average American's retirement savings is by age. Here's what the group found.

At first, this might look encouraging -- but these numbers need to be put in context. If you follow the 4% safe withdrawal rule, someone with a nest egg of $172,000 will only be able to take out about $7,000 per year for living expenses. That's not enough for many people.

But we can't forget about Social Security. The average monthly check sent out by the program is roughly $1,278. That equates to about $15,300 per year if there was one worker in the household. Combine that with retirement savings and you're looking at $22,300 -- again, a standard of living that would put you near the poverty line. Of course, if there's more than one worker receiving Social Security, that could improve the situation, but you get the general idea.

So where should you be?

Three years ago, Fidelity set out a framework for how to measure one's success in saving for retirement. The framework looked like this:

By Age...

You Should Have This Much of Your Salary Saved...













Last year, the average U.S. household brought in roughly $54,000 per year. If we use this level as a baseline, we can get an idea of where we start to lose our way.

As you can see, starting in our late 30s and early 40s, we seriously start falling behind. Why does this happen? Moving into a new house, having kids, saving for college, repairing the AC, soccer fees, one parent staying at home to take care of kids. All of those things have opportunity costs.

But it's also worth stating that one of the biggest killers of retirement savings is lifestyle inflation. We have this insidious habit, as Americans, of continually upgrading our possessions as we get older and earn more money. Of course, if these upgrades truly made us happier in proportion to the money we were spending, that'd be great.

But both research and personal experience tell us that this just isn't the case. After a certain level of material wealth -- namely, enough to meet our basic needs -- money doesn't add nearly as much happiness as other factors, like freedom of time, personal connections, and working toward a meaningful goal.

Ironically, if we could resist temptation and stay off the hedonistic treadmill, we would both (1) find ourselves happier and (2) be doing a better job of saving for retirement, as our lifestyle would cost less, as would our requirements for a comfortable retirement.

For those of us (myself included) headed into this stage of our lives, that's an important lesson to remember.