It can make a lot of sense for a software company to pour a big percentage of its revenue into the acquisition of new customers. Software companies usually enjoy lofty gross margins because it doesn't cost very much to deliver software, whether it's perpetual licenses or subscriptions.

If a software company must spend $1,000 to acquire a customer who then spends $800 annually on a product that delivers an 85% gross margin, it takes just about a year and a half for enough gross profit to be generated by that customer to cover the acquisition cost. Knock the gross margin down to 50%, and now it's a 2.5-year payback period. That's not nearly as appealing.

Growth at all costs

That brings me to Twilio (TWLO 0.13%). Twilio's core product is a set of application programming interfaces (APIs) that allow developers to quickly and easily integrate text message sending and receiving into their applications. The company has expanded over the years, partly through acquisitions, and now offers email services, marketing solutions, a cloud-contact center platform, and a variety of other services.

The ability to send text messages is valuable to a lot of companies, especially when it comes to real-time updates. A grocery delivery service being able to orchestrate texting between the customer and the person assembling the order is a valuable capability. Twilio makes that happen without much fuss.

But while emails are extremely inexpensive to send, text messages are not. Twilio charges $7.90 to send 1,000 text messages under its pay-as-you-go plan, while sending 1,000 emails under Twilio's SendGrid product costs less than $1. For companies like grocery delivery providers with ultra-slim or nonexistent profit margins, there's a hard limit to how much text messaging can cost before it's replaced with something cheaper.

What this means is that Twilio probably doesn't have much in the way of pricing power. Text messages can be dropped for alternatives if they become too costly to send. That's a problem because Twilio's own costs to support sending and receiving texts are considerable.

Twilio sells software, but it doesn't enjoy the gross margins of a software company. Twilio's GAAP gross margin was just 47.2% in the second quarter, a far cry from the 80%-plus gross margin that some software businesses manage.

The reason for this low gross margin is that Twilio must pay fees to network service providers. That's the bulk of Twilio's cost of revenue. Other costs include cloud infrastructure fees, salaries for customer support employees, and other smaller items. Twilio can't deliver its core service without agreements with network service providers, and some of those agreements are noncancelable.

So Twilio's gross margin is far lower than typical software companies, but it still spends like a typical software company. Twilio dumped 36% of revenue into sales and marketing and another 30% of revenue in research and development. In total, operating expenses ate up 80% of revenue.

This level of spending would not be a problem if Twilio's unit economics were more like a typical software company. Instead, the company delivers bottom-of-the-barrel gross margin while spending unsustainably on customer acquisition. It can't go on forever.

Investors aren't happy

Shares of Twilio are down nearly 85% from their all-time high in 2021. The company is still growing, but with a market that's punishing unprofitable tech stocks, growth alone just isn't enough anymore.

Twilio is the king of unprofitable tech stocks. The company posted a net loss of $323 million on $943 million of revenue in the second quarter. It's hard to see what a path to profitability even looks like. Winning customers won't do it because the cost of acquire those customers is so high, and the gross profit generated from those customers is so low.

Twilio is getting more unprofitable as it scales, which is bad. Gross margin has been in decline since 2017. Acquisitions and diversifying away from text messaging hasn't helped. It's not clear what will help, other than some pretty dramatic cost-cutting. But of course, that means that growth would likely slow.

Sooner or later, Twilio will have to face the music and start working toward building a sustainable business. I have no interest in investing until it does.