Quick -- what were you doing back in September of 2022? Were you buying $10,000 of stock in Amgen (AMGN -1.27%)? If so, you might be wondering what that's worth today. Even if you didn't buy Amgen stock then, you might wonder how it has performed -- and if you should buy some shares now.

Here's the answer to the question: Over the past three years, a $10,000 investment in Amgen would have become a stake worth ... $12,661. That may seem OK, as your money did grow. And on an average annual basis, it grew by about 8.2%, but it lags the S&P 500 index's performance. The S&P 500 averaged a whopping 19.7% annually in that period, enough to turn a $10,000 investment into $17,138.

Someone is looking up, in front of arrows going in different directions on a blackboard.

Image source: Getty Images.

That's all very interesting, but what really matters is how the company and its stock are likely to do in the years to come. If you're a shareholder, you want to know whether to hang on or not. If you're a would-be shareholder, you want to know whether it makes sense to buy Amgen now.

Well, Amgen is a very intriguing potential investment right now. Its second quarter featured revenue up 9% year over year, with 15 of its offerings posting double-digit sales growth. Its pipeline encompasses 50-plus drugs in development, some already looking quite promising.

Amgen and other pharmaceutical concerns are also appealing, because if the economy heads south, customers will not stop buying their medications if they can help it.

Amgen's valuation is reasonable, too: Its recent forward-looking price-to-earnings (P/E) ratio of 13 is slightly below its five-year average of 14. It's also a dividend-paying stock, with a recent dividend yield of 3.35%. Its total annual payout has grown, too: Its recent $9.39 per share is up from $7.04 in 2021 and $5.28 in 2018. So give Amgen a closer look if you think it might be a good fit for your long-term portfolio.