If you were to save $50 each week, that would result in an annual savings of $2,600. Over the span of 30 years, that's $78,000. That's not something you can retire on. But if you invested those savings into a safe growth stock, you could potentially have $1 million by the time you retire. Thanks to compounding and dividends, you can turn a $50-per-week investment into a nest egg that can help you live comfortably in your retirement years.

Growth stocks that pay dividends can help maximize your returns

The S&P 500 averages a long-run return of approximately 10% per year. But it's possible to outperform that, especially when you factor in dividend income, which can help pad your profits. A couple of solid stocks that have generated consistent revenue growth over the years while also paying dividends are health insurance giant UnitedHealth Group (UNH -1.41%) and top drugmaker Eli Lilly (LLY 1.71%). In the past 10 years, their total returns (including dividends) have dwarfed the broad index.

Chart showing Eli Lilly's and UnitedHealth Group's total returns matching or beating the S&P 500 since 2016.

Data by YCharts.

There are never guarantees about how these businesses will do in the future. However, UnitedHealth is a staple in the healthcare industry, and with a growing population of seniors, demand for its services isn't likely to drop off anytime soon.

Meanwhile, Eli Lilly's business could have a prized blockbuster in Mounjaro, a treatment for diabetes that is proving to be incredibly effective in helping people lose weight as well.

Both of these stocks could remain market-beating investments for the foreseeable future. So staying the course and investing $50 weekly into either of these stocks could play a significant part in a long-term retirement plan.

The path to $1 million

To get to $1 million by investing just $50 each week, you would need to generate an annual growth rate of a little over 13% per year, provided that you have 30 investing years left. Here's how your portfolio balance would look each year at that level of investment and growth:

Chart by author.

This model assumes you reinvest the dividend income you receive back into your investment. It also doesn't factor in commission costs. If those expenses are significant, you may be better off investing every month instead of every week.

Although shares of UnitedHealth and Eli Lilly trade at more than $300, you can acquire fractional shares and accumulate them over time.

Investors shouldn't get discouraged by a lack of savings

Inflation can make it incredibly difficult to save money and invest in the stock market right now. But getting into the habit of trying to save whatever you can on a periodic basis, whether weekly, monthly or even yearly, could pave the way for a better future in the years ahead.

Eli Lilly and UnitedHealth are just two examples of safe growth stocks you can invest in, but there is no shortage of quality options out there for investors to consider. The key is to focus on investments with strong fundamentals that ensure your portfolio isn't at risk and where there's a reasonable expectation that their underlying businesses will continue growing in the future.