Buying top growth stocks can be an excellent way to raise your portfolio's value over time. Investors often flock to businesses that are generating strong and impressive financial results. Dividend stocks might offer some more stability and plenty of recurring revenue, but the biggest gains often come from companies that are focused on long-term growth.

Two of the best growth stocks you could have owned over the past five years are e.l.f. Beauty (ELF 1.79%) and Broadcom (AVGO -0.62%). These businesses have performed exceptionally well, amassing some incredible gains in a fairly short time. But I'll look at why they can still rise higher in the years ahead.

e.l.f. Beauty

A growing brand in the cosmetics industry in recent years has been e.l.f., which has been popular in social media due to its more-attractively priced products. According to a Piper Sandler report from last year, e.l.f. was the top-rated cosmetics brand among U.S. teens.

And that popularity has propelled the stock to some incredible 487% returns over the past five years. Those gains would be even higher right now if not for the stock's recent sell-off; shares of e.l.f. are down 27% this year as investors worry about the economy and whether discretionary purchases such as cosmetics will remain strong.

But e.l.f. is doing well, with the company generating $122.2 million in profit over the trailing 12 months. In previous years, the company wouldn't generate even half that amount. Meanwhile, the business remains on a tear.

Revenue for its most recent quarter (which ended on June 30) totaled $324.5 million and rose by an impressive rate of 50% when compared to the prior-year period. And that was the 22nd consecutive quarter in which the company has generated net sales growth.

This company still has a lot left in the tank, and even if its growth rate falls due to a harder economy, it could have a resurgence due to its popularity with younger consumers. At 32 times its estimated future profits, this might not seem like a terribly cheap stock right now. But if you're willing to hang on for the long term, you might be able to generate some terrific returns from e.l.f. since it still has plenty of potential.

Broadcom

Another hot stock to own in recent years has been Broadcom. The semiconductor company has been riding the artificial intelligence (AI) wave of late, and its five-year returns come in at 528% as of this writing.

Given its important role in AI, there's reason to remain bullish on the business. Businesses need the proper infrastructure to help develop next-gen technologies, including chatbots.

Broadcom CEO Hock Tan expects that revenue from AI chips and parts will total $12 billion for the current fiscal year, which ends this month. That would be roughly one-quarter of its top line since the company's quarterly revenue for its most recent period, which ended on Aug. 4, was $13.1 billion.

Sales were up 47% last quarter, and with the AI race still in its early innings and Broadcom proving to be a key player in it, this is a stock that still has a lot of upside.

What's appealing about Broadcom is that the stock may still be a bit of a modest buy as it trades at a forward price-to-earnings multiple of 29 (based on analyst estimates), which may not be all that expensive for an artificial intelligence stock with so much growth potential; AI stocks often trade at higher valuations. Given the promising opportunities for the business, it's hard to not like Broadcom in the long run.