Fast-growing Palantir is quickly becoming a critical government contractor with an expanding footprint.
BigBear.ai is marching toward profitability and is looking to mimic the Palantir success story.
You may not even realize how much artificial intelligence (AI) has already infiltrated daily lives -- voice assistants on smartphones, personalized recommendations when you shop online or watch a video, personalized ads, auto tagging on photos, smart home devices and AI-powered customer service bots -- and that just scratches the surface. AI is already everywhere and it's going to get even more ubiquitous.
But you may not realize that AI is also deeply embedded in the U.S. government. And it's working with several companies on critical projects to increase the use of AI in the federal workspace.
Where to invest $1,000 right now? Our analyst team just revealed what they believe are the 10 best stocks to buy right now. Learn More »
In particular, let's look at Palantir Technologies (NASDAQ: PLTR) and BigBear.ai (NYSE: BBAI) as two ways to invest in the growing influence of artificial intelligence in the federal government.
Image source: Getty Images.
Palantir is clearly the biggest name when you think about AI and the federal government because of the dynamic growth in the company's stock over the last few quarters. Palantir stock is up 414% in the last 12 months and nearly 90% in 2025 alone. Just a year ago, you could buy this company's stock for less than $22 per share.
Palantir's growth is tied to the release of its Artificial Intelligence Platform (AIP), which incorporates large language models into Palantir's Gotham and Foundry platforms that are geared toward government and commercial clients, respectively. By using generative AI in Palantir's already powerful platforms, customers are able to craft detailed prompts to command Palantir to provide insights from numerous data points to help users make real-time decisions. That's also incredibly important in battlefield situations, as Palantir can take information from hundreds of satellites and give commanders information that they need to accomplish objectives and keep troops out of harm's way.
Palantir is also reportedly expanding its government role beyond the military -- working with the Department of Homeland Security, the Department of Health and Human Services, and possibly the Social Security Administration and the Internal Revenue Service in order to create a centralized government database. While that's controversial in its own right, it's an objective that Elon Musk had when he was heading the Department of Government Efficiency (DOGE). That work is continuing even though Musk is out of the administration.
To be sure, Palantir has an insane valuation, with a price-to-earnings ratio of 617 and a forward P/E of 250. That alone is enough to scare off a lot of investors. But I'm convinced that Palantir is a revolutionary stock with a long road ahead of it, which is why it's still a buy for me.
BigBear.ai also works with the Pentagon and intelligence agencies, but not to the same extent as Palantir. But BigBear.ai is a name to watch. And there's plenty of growth to be had with this stock should the government contracts continue and expand.
Its contracts include a $13.2 million award issued in March for the chairman of the Joint Chiefs of staff. The contract calls for BigBear.ai to modernize and maintain the Orion Decision Support Platform that is used by the Joint Chiefs office to provide analytics and automated force management capabilities to the Department of Defense.
The company also won a $165 million contract that began late last year to modernize U.S. Army systems with integrated, data-driving force management platforms.
Those are significant contracts for a company that reported only $34.8 million in revenue in the first quarter of 2025. And while the company's revenue growth is only 5% on a year-over-year basis, it now has a backlog of $385 million in contracts.
Perhaps more significantly, BigBear.ai is marching steadily toward profitability. The company reported a loss of $62 million in the first quarter, which was much improved from the $127.8 million loss it posted in the first quarter of 2024. In addition, BigBear.ai issued guidance for full-year revenue between $160 million and $180 million, versus full-year revenue of $158.2 million in 2024.
If you are looking for the next Palantir, BigBear.ai may be it. As it's still in the red, the company doesn't have a P/E ratio, but its price-to-sales ratio is just over 10 -- which is much more appealing than Palantir's P/S ratio of 113.5.
Before you buy stock in Palantir Technologies, consider this:
The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Palantir Technologies wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.
Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $679,653!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $1,046,308!*
Now, it’s worth noting Stock Advisor’s total average return is 1,060% — a market-crushing outperformance compared to 179% for the S&P 500. Don’t miss out on the latest top 10 list, available when you join Stock Advisor.
See the 10 stocks »
*Stock Advisor returns as of July 15, 2025
Patrick Sanders has positions in Palantir Technologies. The Motley Fool has positions in and recommends Palantir Technologies. The Motley Fool has a disclosure policy.