One trillion dollars is a lot of money. In fact, it's so much money, it can be hard difficult to grasp.

If you took $1 trillion worth of $1 bills and stretched them end to end, they would extend just shy of 97 million miles -- longer than the distance from the earth to the sun.

Nevertheless, there are companies worth this astronomical sum, and undoubtedly, there will be more. Will Advanced Micro Devices (AMD 1.99%) be one of them? And can it hit a $1 trillion valuation by 2030? Let's find out.

Person looking at a computer screen and thinking.

Image source: Getty Images.

How much AMD has grown over the last five years

To understand where AMD might be headed over the next few years, let's first examine how it has grown over the last five years. Namely, how its market cap has ballooned.

In 2019, AMD's market cap stood at $28 billion. Today, the company has a market cap of more than $263 billion. That makes it the 28th-largest company in America, larger than corporate icons such as Coca-Cola, Walt Disney and McDonald's.

Indeed, AMD has shot up the list at a truly breathtaking speed. Its market cap has grown at an astounding 54% compound annual growth rate (CAGR) over the last five years.

AMD Market Cap Chart

AMD Market Cap data by YCharts

Not surprisingly, the company's outstanding fundamentals are behind its impressive growth. Over the last five years, revenue has grown from $5.9 billion to $22.7 billion. Net cash (i.e., cash reserves minus total debt) has increased from zero to $3.3 billion.

Can AMD reach $1 trillion by 2030?

Despite its remarkable growth over the last five years, it will still be a heavy lift for AMD to hit $1 trillion by 2030. The company's market cap would need to nearly quadruple. That implies a CAGR of 27.5%.

For that to happen, the company must execute on its biggest area of growth: the artificial intelligence (AI) chip market.

AMD's fantastic CEO, Lisa Su, has noted that the overall AI chip market may grow to $400 billion by 2027. That's more than 10x the size of the market in 2022.

Currently, much of that market is controlled by AMD's rival, Nvidia. However, AMD has a plan to grow its share of the AI chip market, starting with its MI300x chips, which were designed to compete with Nvidia's best AI chips. With AMD set to report quarterly earnings in a few weeks, investors should get an update on how that plan is working out.

At any rate, hitting the $1 trillion mark is a lot to ask. And while I certainly wouldn't rule it out, AMD will need to execute almost flawlessly over the next five years to achieve it.

Is AMD a buy now?

Whether or not AMD hits $1 trillion by 2030, the real question for investors is whether the stock is a buy right now. While I'm optimistic on the company's long-term growth prospects, there's no denying that the stock's valuation looks expensive today. Shares trade at a price-to-sales ratio of 11.6, more than double its 10-year average of 5.

AMD PS Ratio Chart

AMD PS Ratio data by YCharts

In addition, key long-term measures such as free cash flow per share have dropped in recent years, as the company has ramped up its capital expenditures.

In short, AMD has been a great stock to own, and it is poised to capitalize on the AI revolution over the long term. However, investors may wish to exercise caution for the moment. The stock's high valuation means it isn't a wise choice for every investor.