Bill.com (BILL -0.40%) stock went public in Dec. 2019 at an initial offering price of $22 per share, and by the latter half of 2021, it had soared almost 1,500% to an all-time high of $348.50. Two factors drove its incredible gains: The company was consistently growing its revenue at a triple-digit rate, and investors were caught up in a broader frenzy for technology stocks.

Neither of those factors remain in play today. Bill.com's revenue growth has moderated, and soaring interest rates over the past couple of years have pushed investors to behave more rationally. As a result, Bill.com stock is now trading 84% below its all-time high, but its sell-off might be just as irrational as its ascent.

Here's why investors might want to buy Bill.com.

Bill.com's software serves a growing need

Small and mid-size businesses don't have resources comparable to larger organizations, which means even basic processes can take up a disproportionate amount of time and effort. For example, absent a dedicated bookkeeper or chief financial officer, a small business operator is often responsible for paying invoices, tracking expenses, and ensuring they're paid on time -- on top of managing day-to-day operations.

This is where Bill.com's flagship product comes into play. The company can offer users a digital inbox designed to aggregate incoming invoices to eliminate messy paper trails. The user can also pay those bills with a single click, and thanks to integrations with leading accounting software, it automatically logs each transaction in the books.

Bill.com also owns Invoice2go, which handles the other side of the equation. It allows businesses to quickly create invoices, email them to customers, and track the incoming payments. Divvy is another Bill.com-owned platform that helps businesses create budgets and track their expenses.

Bill.com was serving 464,900 customers at the end of its fiscal 2024 third quarter (ended March 31) across all platforms, with 5.8 million network members who have paid or received funds using its software. The company has put together a powerful acquisition network that includes around 8,000 accounting firms. They recommend Bill.com's software to their clients to make it easier to manage their financial reports, which is a win for all parties.

Smiling business owner hanging open sign on shop door.

Image source: Getty Images.

Strong revenue growth with a side of profitability

Bill.com generated $323.0 million in revenue during the fiscal third quarter, up 19% year over year. While that marked a continued deceleration from the company's growth rates in prior quarters, the result was comfortably above management's guidance of $304 million.

That prompted management to increase its full-year revenue forecast to $1.272 billion (at the midpoint of the range).

Bill.com's bottom line revealed an even bigger achievement. The company has employed a growth-focused strategy since it was founded, pushing forward on customer acquisition even if it meant operating at a loss. But challenging economic conditions forced Bill.com to pivot in 2022, and it has carefully managed costs ever since to focus on achieving profitability.

Last quarter, operating expenses increased just 6%, allowing more money to flow to the bottom line. As a result, the company generated net income of $31.8 million, a big swing from the $31.1 million loss it reported in the prior-year period.

Why Bill.com stock is a buy for the long term

While it's true Bill.com has seen its top line decelerate, it is still growing. Considering its stock price has fallen 84% from its all-time high, that has compressed its price-to-sales (P/S) valuation significantly.

In fact, Bill.com stock trades at a P/S ratio of just 5, which is the cheapest level since it became a public company:

BILL PS Ratio Chart

Data by YCharts.

Bill.com may already serve 464,900 business customers, but the company says there are more than 70 million small and mid-size businesses in its addressable market. They spend around $344 billion on software per year, and they execute a whopping $125 trillion worth of transactions. In other words, Bill.com hasn't even scratched the surface of its long-term opportunity.

Now that the company has achieved profitability, I wouldn't be surprised to see the pendulum swing back toward growth. That would be even more likely if the U.S. Federal Reserve cuts interest rates this year, because it would reduce the cost of capital and fuel economic activity, both of which would give businesses more money to spend on software -- and Bill.com won't want to miss that opportunity.

The sell-off for Bill.com has gone too far given the company's consistent growth and its future potential. Now could be a great time to buy and hold this stock for the next decade (and beyond).