After the S&P 500 (^GSPC 0.61%) fell by over 19% in 2022, the stock market's most popular index has been on an impressive run since the beginning of 2023. It finished 2023 up by over 24%, and the momentum in 2024 has it at an all-time high.

The S&P 500's performance has been great news, but it can also cause some investors to question if now's the right time to enter the market or add to their holdings. Despite the index being at an all-time high, here are two stocks I'll be adding to my retirement account regardless. Each company has long-term growth potential and stability that I don't have to second-guess.

1. Microsoft

Microsoft (MSFT 1.44%) is now the only company in the coveted $3 trillion market cap club, after Apple dropped below the mark (as of Jan. 29).

Arguably, no other tech company has done as impressive a job as Microsoft when it comes to building a well-diversified ecosystem of products and services. Unlike Apple (which relies heavily on the iPhone), Alphabet (which relies heavily on Google advertising), or Amazon (which relies heavily on e-commerce), Microsoft's businesses span a broad range, with each holding its own weight.

Microsoft's diversified business model has worked wonders for its financials. In the past five years, its revenue and net income have jumped, but the pace at which its net income has grown shows the efficiency of its operations.

MSFT Revenue (Quarterly) Chart
MSFT Revenue (Quarterly) data by YCharts.

What I appreciate more than just the impressive financials -- and why I trust the company for the long haul -- is where this money comes from: other corporations. Microsoft has done a great job intertwining itself in the global business work, to the point where many businesses wouldn't function as efficiently without Microsoft's products and services.

Consider how many corporations rely on Microsoft Office for Excel, Azure for cloud services, LinkedIn for recruiting, and Windows for their operating system. The list goes on, and this likely won't change anytime soon. As Microsoft continues to innovate and attract corporate customers, I trust its position as a key part of the global business world will remain strong.

2. Visa

A vital characteristic I want in a company that I'm adding to my retirement portfolio is an economic moat. In Visa's (V -0.99%) case, its economic moat is its global reach. With over 130 million merchant locations and 4.3 billion cards in circulation, Visa is the payment processing industry leader -- and it's not even close. 

In the payment processing industry, Visa's reach is important because the network effect allows it to grow organically. If you're a potential cardholder or merchant, you're more incentivized to go with Visa because it's the most accepted and used card. This network effect has helped the company expand globally at an impressive pace. In its 2023 fiscal year (ended Sept. 30), its cross-border volume grew 20% year over year, and its total processed transactions grew 10% year over year.  

Visa's market dominance isn't going anywhere (if ever), and the emergence of digital payments gives it lots of growth opportunities going forward. With industry-leading profit margins and free cash flow, Visa has the financial strength to continue expanding its global reach and innovating with the payment industry.

V Profit Margin Chart
V Profit Margin data by YCharts.

Both Microsoft and Visa offer the best of both worlds

When most people think of dividend stocks, their minds don't go to Microsoft and Visa. However, both companies do, in fact, pay a dividend. Dividends reward investors for their patience (regardless of stock price movements) as well as add to their total returns.

Sometimes, a dividend is meant to make up for a lack of stock price growth. In Microsoft and Visa's case, the dividend is a two-for-one gift to investors. Both companies have high stock price growth opportunities, so the dividend is a bonus.

By no means are their dividend yields eye-popping, but any little bit can add up over time -- especially with the companies increasing the payouts annually. Microsoft and Visa's trailing-12-month dividend yields are both only around 0.70%, but they've both increased nicely over the past decade.

MSFT Dividend Chart
MSFT Dividend data by YCharts.

When you're investing for retirement, stocks that pay dividends are great, but stocks that increase their dividends annually are better. The compounding effect can really pay off over time. Buy Microsoft and Visa stock, and let time work its magic.