The idea of leaving the workforce for good can be daunting to men and women alike. But new data from Transamerica reveals that the overwhelming majority of women sorely lack confidence in what the future holds for them. In fact, only 12% of women are very confident that they'll manage to retire and maintain a comfortable lifestyle.

If you're feeling insecure about retirement, here are a few key moves you can make during your career to improve your prospects during your senior years.

1. Save and invest aggressively

Women have a median $23,000 socked away for retirement. Among younger women -- those in their 20s and even 30s -- that's not necessarily cause for alarm, but among women nearing retirement, it's downright disturbing, especially since women anticipate needing a median $500,000 in savings to live comfortably once they stop working.

Older woman with crossed arms and serious expression against a blue background

IMAGE SOURCE: GETTY IMAGES.

If your savings need a serious boost, it's time to rethink your current lifestyle and make substantial changes. That could mean downsizing to a smaller living space, giving up a vehicle if lower-cost public transportation exists where you live, and spending less money on luxuries like restaurant meals, non-work clothing, and entertainment.

But don't just carve out more cash for savings; invest your savings wisely for maximum growth, too. If you're at least 10 years away from retirement, that means loading up on stocks, which have historically delivered much higher returns than bonds. If you invest your savings mostly in stocks over a 10-year window or longer, you're likely to generate an average annual 7% return, since that's a bit below the stock market's average. And if you manage to free up $600 a month for your IRA or 401(k) plan, you'll grow your nest egg to almost $300,000 over a 20-year period.

2. Maximize your Social Security benefits

An estimated 32% of women expect that Social Security will be their primary source of income during retirement. That's troubling, because those benefits only replace about 40% of the average worker's pre-retirement wages, and most seniors need more like 70% to 80% of their former income (sometimes more) to live comfortably. Furthermore, because women are statistically likely to earn less than men, they stand to collect less money from Social Security during retirement, since benefits are calculated based on lifetime wages.

Rather than rely too heavily on Social Security, focus on boosting your nest egg, as discussed just a moment ago. At the same time, take steps to increase your Social Security benefits as much as possible so they serve as a more substantial income source. You can do this by fighting for fair wages during your working years and boosting your job skills to warrant ongoing increases in pay.

Also, aim to put in at least 35 years in the workforce, as your highest-paid 35 years of wages will determine what monthly benefit you'll collect in retirement. For each year within that 35 that you don't have an income on file, you'll have $0 factored into your benefits equation. If you took an extended career break at any point to raise children or for another purpose, you can compensate by extending your time in the workforce later in life.

3. Get out of debt

Carrying debt into retirement can make for a stressful situation when you move over to a fixed income. A good 65% of women cite paying off debt as a financial priority, so if you're in that boat, aim to pay yours off efficiently. That means focusing on first paying off high-interest debt, like that of the credit card variety, and then moving on to tackle mortgage debt (which is not only considered the healthy kind to have but can also result in some lucrative tax breaks).

If you're worried about maintaining a decent lifestyle in retirement, do everything in your power to plan well for that milestone. Save more money, invest your nest egg wisely, boost your Social Security benefits, and eliminate as much existing debt as you can. Once you do, you're likely to find that your outlook on retirement improves tremendously.