In 2018, Apple became the first company to achieve a market capitalization of $1 trillion, but several other companies (mostly in the technology sector) have crossed that threshold at times since then. Of course, there is nothing especially significant about a valuation of $1 trillion, but the figure is undeniably satisfying.

Here are two other companies that could each be worth $1 trillion by the end of the decade.

1. Tesla

Tesla (TSLA 1.50%) is the market leader in battery electric vehicle (EV) sales and a front-runner in the race to bring a fully autonomous car to market. Despite challenges related to supply chain disruptions and rising interest rates, the company reported strong financial results last year. Revenue rose 51% to $81.5 billion and GAAP net income soared 122% to $3.62 per diluted share. But the headline figure was its 16.8% operating margin, the highest among volume carmakers, which points to the competitive advantage it holds in the form of manufacturing expertise. Indeed, CEO Elon Musk asserts Tesla has the most advanced manufacturing technology on the planet.

Better yet, Tesla should be able to drive its operating margin even higher in the future. Logistics costs should fall as EV production increases at Gigafactory Berlin, its first manufacturing plant in Europe, and the same principle applies to the recently announced Gigafactory Mexico. The company should also see manufacturing costs fall as production of its 4680 battery cell reaches scale. Tesla can already build battery packs at a lower cost per kilowatt-hour than its peers, but management says the 4680 cells will further extend that advantage.

Additionally, Tesla sees significant opportunity in its full self-driving (FSD) platform. According to Musk, FSD software can be sold to individual drivers at a nearly 100% gross margin, but that technology will also power the robotaxis Tesla plans to begin producing in 2024. Those robotaxis will bring the company one step closer to its ultimate goal of launching an autonomous ride-hailing service, a market that Ark Invest believes will generate $9 trillion in revenue by 2030. That makes the EV market -- which is expected to grow at 32% annually to reach $1.7 trillion by 2032 -- look small by comparison.

Currently, Tesla stock trades at a pricey 49.8 times earnings, but that valuation multiple may look much more reasonable a few years down the road as the company expands its manufacturing footprint, scales 4680 battery cell production, and begins monetizing its FSD platform more effectively. With that in mind, Tesla currently has a market capitalization of $570 billion. That figure would need to increase at roughly 8% annually to reach $1 trillion by 2030, which seems quite feasible given its growth opportunities.

2. Nvidia

Nvidia (NVDA -1.99%) is best known for its graphics processing units (GPUs), semiconductors built to process large amounts of data very quickly. Nvidia GPUs are the gold standard in video game graphics, cinematic visual effects, and accelerated data center computing, especially for complex applications like artificial intelligence (AI). In fact, Nvidia GPUs hold more than 90% market share in workstation graphics and supercomputer accelerators. But investors should be cognizant of the fact that Nvidia is more than a chipmaker.

Nvidia brands itself as a full-stack computing company because it supplements its chips with a growing number of subscription software products and cloud services. The latest one, DGX Cloud, provides businesses with on-demand access to supercomputing infrastructure and software to streamline the development of AI applications. Another noteworthy product is Nvidia Omniverse Cloud, a suite of 3D design and simulation software used to build metaverse applications and train all sorts of autonomous machines, from self-driving cars to logistics robots.

Admittedly, Nvidia reported disappointing financial results last year as high inflation suppressed demand for its data center and gaming chips. Revenue was flat at $27 billion and GAAP net income plummeted 55% to $1.74 per diluted share. But growth should reaccelerate when the economy regains its momentum.

Nvidia has several tailwinds at its back, the greatest of which is the growing demand for AI solutions. In fact, AI software revenue is expected to increase at 42% annually to reach $14 trillion by 2030, according to Ark Invest. But Nvidia should also benefit from continued demand for cutting edge graphics in video games and cinema, the evolution of technologies like virtual reality and the metaverse, and broader growth in data center computing.

Currently, Nvidia stock trades at a pricey 25.7 times sales, well above the three-year average of 20.9 times sales, and the company has a market capitalization of $680 billion. If Nvidia can grow revenue at 15% annually through 2030 -- a conservative estimate given its average revenue growth of 23% annually over the last five years -- Nvidia could achieve a $1 trillion market capitalization by the end of the decade while its valuation drops to a more reasonable 12.2 times sales. Investors should consider a buying a small position in this growth stock today, but I would wait for a cheaper multiple before buying a big position.