Meta Platforms (META -0.52%) is the parent company of social networks like Facebook, Instagram, and WhatsApp. Meta stock could be a buy right now because of its attractive valuation and the company's strong revenue and earnings growth.

Meta is currently supercharging its business with artificial intelligence (AI). It's using the technology to keep users engaged for longer periods of time, to launch new features, and to help businesses improve conversions with better advertising content. Plus, the company has developed one of the most popular open-source large language models (LLMs) in the world, called Llama. Read on.

A content creator filming a video with a smartphone in a forest.

Image source: Getty Images.

AI is transforming Meta's advertising business

Over 3.4 billion people use Meta's social networks every single day. The company generates the majority of its revenue by selling advertising slots to businesses on those platforms, so more users equals more money in the door. But keeping each user online for longer periods of time is another valuable way to attract more advertising dollars, and AI is playing a massive role in boosting engagement.

Meta's AI algorithm learns what each user likes to see, and it feeds them more of it. That's why your content feed on Facebook and Instagram is constantly filled with photos and videos you're interested in -- if you regularly watch videos of golden retrievers, Meta's AI algorithm will work overtime to show you more of them. Before you know it, a quick scroll has turned into an hour-long session.

In fact, during his conference call with investors for the first quarter of 2025 (ended March 31), Meta CEO Mark Zuckerberg said AI-driven recommendations resulted in a 7% increase in the amount of time users were spending on Facebook over the previous six months, and a 6% increase on Instagram.

But advertising on platforms with lots of users and high engagement doesn't guarantee success because businesses need to create ad content that attracts interest, fosters interactions, and ultimately converts. Meta thinks AI can do this better than the average small business operator, so it's rolling out new tools to automate as much of the process as possible.

Zuckerberg says one day in the future, businesses will simply tell Meta their objectives (like boosting sales or brand awareness) and their budget, and AI will autonomously handle everything from crafting the ad creative to targeting the appropriate audience.

Llama is the future of Meta's AI strategy

LLMs sit at the foundation of every AI chatbot application. Meta has been developing a family of models since 2022 called Llama in order to compete with leading AI start-ups like OpenAI (which is responsible for ChatGPT). Llama LLMs are now among the most widely used open-source models in the world, and the latest Llama 4 family outperforms even some of the best closed-source models from OpenAI and Anthropic across several benchmarks.

This is really important because the highest quality LLMs typically power the "smartest" AI software. Meta used Llama to create the Meta AI virtual assistant, which is accessible through Facebook, Instagram, WhatsApp, Threads, and Messenger, where it can answer questions on almost any topic and generate images on command. At the end of the first quarter of 2025, Meta AI had almost 1 billion monthly active users, which was up from 700 million just three months earlier.

Meta will have to continue improving Llama if it wants Meta AI to stay competitive with other chatbots, which is why the company plans to allocate up to $72 billion toward capital expenditures (capex) this year alone. That money will go toward building additional AI data center infrastructure, which includes buying thousands of AI chips from top suppliers like Nvidia.

Wall Street's consensus estimate (provided by Yahoo! Finance) suggests Meta could generate around $187 billion in total revenue this year, which puts the sheer scale of its AI capex spending in perspective.

Is Meta Platforms stock a buy right now?

The enormous amount of AI-related capex is putting a dent in Meta's earnings power, but the company continues to deliver growth at the bottom line regardless, which makes its current valuation highly attractive.

Meta is the second-cheapest stock in the "Magnificent Seven," which is a group of its big-tech peers. Based on the company's trailing-12-month earnings per share (EPS) of $25.64, it's trading at a price-to-earnings (P/E) ratio of 26.6:

TSLA PE Ratio Chart

Data by YCharts.

But Wall Street's consensus estimate (provided by Yahoo! Finance) suggests the company's annual EPS could grow to $28.48 in 2026. Meta's forward P/E ratio based on that estimate is 23.9, meaning its stock would have to climb by 11.3% over the next 18 months just to maintain its current P/E ratio of 26.6.

However, Meta stock would have to soar by 42.6% over the next 18 months to trade in line with the median P/E ratio of the Magnificent Seven, which is 34.1. Considering the company's momentum in the AI space, I think there is a realistic chance this scenario will play out. In other words, yes, I think Meta stock could be a great buy right now.