Buying mid-cap stocks is a great way to diversify a portfolio. Mid-cap companies -- classified as those with market capitalizations between $2 billion and $10 billion -- operate in fast-growing industries and can generate stronger returns when compared to large-cap stocks. More importantly, they are less volatile when compared to small-cap stocks.

That's why now would be a good time to look at Corsair Gaming (CRSR -1.47%) and Bandwidth (BAND 2.27%) -- two mid-cap companies that are growing at a nice pace, are built for long-term growth, and are worth putting down $1,000 on thanks to their cheap valuations. Let's take a closer look at these two companies.

Woman using a smartphone for investing.

Image source: Getty Images.

1. Corsair Gaming: Riding the video gaming wave

Corsair Gaming's stock has doubled since the company went public in September 2020, driven by the massive craze for video games during the novel coronavirus pandemic. The gaming peripherals and hardware company's revenue and earnings have shot up impressively as a result of that demand, and the company now has a market cap of just over $2.7 billion.

CRSR Chart

CRSR data by YCharts

More importantly, Corsair's momentum has continued even as the pandemic has waned. Despite vaccine rollouts and a reduction in coronavirus restrictions, Corsair's revenue for the first quarter of 2021 increased a whopping 72% year over year to $529 million. Non-GAAP net income shot up to $0.58 per share from $0.13 per share in the year-ago period.

The company expects $2 billion in revenue this year, which would be an increase of nearly 18% over its 2020 revenue of $1.7 billion. It's worth noting that Corsair increased its full-year revenue guidance by 6.6% when it released its Q1 results in May, so it wouldn't be surprising to see the company exceed its full-year revenue expectations, as the robust demand for PC gaming hardware is likely here to stay for the long run.

According to IDC, shipments of gaming PCs, laptops, and monitors are expected to increase from 55 million units in 2020 to almost 73 million units by 2025. That's not surprising, as gamers are expected to spend a lot of money on upgrading their systems. Jon Peddie Research estimates an increase in sales of discrete graphics cards to $54 billion in 2025, from $23.6 billion in 2020.

As a result, Corsair's gaming components and systems business, which produced nearly 67% of its total Q1 revenue and recorded 52% year-over-year growth, shouldn't run out of steam any time soon. Meanwhile, the high-margin gamer and creator peripherals segment, which accounts for the rest of the revenue, is also in fine form. This business recorded 132% year-over-year revenue growth in Q1, benefiting from the spurt in video game streaming and Corsair's solid market share position.

Just like the components and systems business, the creator and peripherals segment is primed to take advantage of the growth in esports and video game streaming. Juniper Research estimates that the esports and video game streaming industry is on track to grow 70% over the next five years.

All these tailwinds make Corsair Gaming a top mid-cap stock to buy right now, especially considering that it is trading at just 18 times trailing earnings, which is a massive discount to the S&P 500's multiple of 36.

2. Bandwidth: Great growth with amazing value

Bandwidth operates in the fast-growing communications platform-as-a-service (CPaaS) space. According to Mordor Intelligence, this is a rapidly growing niche that could clock a compound annual growth rate of 34% through 2026, generating $26 billion in revenue, compared to just $4.5 billion last year. And Bandwidth has been making the most of this terrific end-market growth.

The company reported a 66% year-over-year surge in revenue in Q1 2021 to $113.5 million. Its non-GAAP net income surged from $0.04 per share in the year-ago period to $0.30 per share in the first quarter. Adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA) jumped over fourfold to $13.4 million during the quarter from $3.1 million in Q1 2020.

But Bandwidth stock hasn't received the market's love despite this terrific growth.

BAND Chart

BAND data by YCharts

As a result, Bandwidth stock is cheap when compared to that of peer Twilio (TWLO -0.55%). With a price-to-sales ratio of 8.3, Bandwidth is way cheaper than Twilio's multiple of 29.3.

Twilio recorded 62% year-over-year revenue growth in the first quarter of 2021, and its adjusted net income of $0.05 per share was down over the prior-year period's figure of $0.06. Bandwidth, therefore, grew at a faster pace than its more illustrious rival, and it trades at a much cheaper sales multiple. Additionally, the company has been attracting customers at a nice pace. Its active CPaaS customer base shot up 64% year over year in Q1 -- and more importantly, existing customers increased their spending on Bandwidth's solutions.

That's evident from a 125% increase in the company's Q1 dollar-based net retention rate, which compares CPaaS revenue from active customers in a quarter to the year-ago quarter. A reading of more than 100% means that the active customers present in both quarters increased their spending on Bandwidth's offerings. Bandwidth seems all set to sustain this terrific momentum for the remainder of the year. Its 2021 revenue is expected to increase around 38% year over year to a range of $473.1 million to $476.1 million. The broader market's potential indicates that Bandwidth should be able to sustain such high growth rates for a long time to come. 

With a market capitalization of $3.3 billion, Bandwidth is a fast-growing mid-cap stock to buy right away, as it could break out in the future. It is cheaper than its more famous peer and is on track to deliver high levels of growth in the future, which is why investors looking to add a fast-growing cloud player to their portfolios should take a closer look at Bandwidth.