Which age group is savvy at retirement planning?

Millennials of a certain age — say, above 30 — have had a rough go of it.

We've been called "generation poor" and a "lost generation" because of how hard we got socked by the Great Recession, with stagnant wages and diminished home values holding us down.

But when it comes to saving, we may actually have something to brag about. We're stashing away a greater portion of our income than middle-aged folks.

In fact, middle-class Americans in their 30s are putting a median 6% of gross income in a 401(k) or equivalent plan, which is 1 percentage point more than middle-class Americans in their 40s, according to a survey conducted by Harris Interactive for Wells Fargo.

The survey polled 1,000 people with household incomes of $50,000 to $100,000, ages 25 to 75, and found that those of us in our 30s are beating out much of Gen X when it comes to saving for retirement.

We're not a lost cause after all.

Not only are 30-year-olds saving more of our income, we tend to be more realistic about what we need to retire.

Graphic displaying the percentage of people over 30 who save and how muchPeople in their 40s, 50s and 60s estimate needing a median of $200,000 in retirement. But those in their 30s said a median of $500,000 is more like it.

In addition, 34% of 30-somethings said they have a written retirement plan, which is about the same as the 31% of 50-somethings and 33% of 60- to 75-year-olds who have a plan.

Amazingly, only a quarter of 40-year-olds have one.

And without a doubt, written plans are crucial to retirement success.

For example, those in the survey with a written plan had saved a median of $63,000, or 32% of their goal, which is more than $40,000 more than people who didn't.

Chalk another win up for those in their third decade with written retirement plans.

Of course, 40-year-olds likely have a few more expenses — teenage kids, for instance.

But as a whole, every age group needs to be saving quite a bit more, regardless of income.

The middle class, at all income levels, has stashed away a pitiful 5% to 8% of their overall savings goal, notes the survey.

Even the 6% that 30-somethings are saving per year is a far cry from the 15% of gross income that many retirement experts say we should be saving annually.

The point is that we can't just be saving what's left over.

Instead, we have to figure out how to adjust our costs so we can stash our cash and move our median savings closer to 15% yearly, especially the millennial generation which has plenty of time and the power of compounding interest on their side.

That means building a written plan and sticking to it even when money is tight.

"People say they don’t have a plan because they don’t have enough money," says Laurie Nordquist, head of Wells Fargo Institutional Retirement and Trust. "The most important message I can impart about retirement is that planning is for everyone."

Follow Mitch Strohm on Google Plus.