Humans may have been keeping pets for tens of thousands of years. Researchers aren't quite sure just how long the relationship has lasted. What they do know is that for many, pets have evolved into members of our family. 

One of the more pronounced trends from the pandemic has been the rush to add those four-legged companions to households. After all, being stuck at home eliminated many of the common reasons people gave for not having a pet. That's led to an improved quality of life for many that can't be measured.

What can be measured is the cost of caring for a pet. And spending has skyrocketed. While that may be a good news, bad news story for pet owners, It is all upside for companies that serve them, like Chewy (CHWY -1.28%), Petco (WOOF 1.60%), Idexx Laboratories (IDXX 0.77%), and Zoetis (ZTS 0.98%).

A parent and child and dog all playing dress up.

Image source: Getty Images.

The baby boom with fur

Earlier this year, the American Pet Products Association announced spending on pets topped $103 billion in 2020. That was a record -- and almost 43% higher than the nearly $73 billion in 2018. About 42% of that is spent on food and another 22% and 25% on supplies and veterinary care, respectively. It is a very fragmented market. But several public companies are reaping the rewards. Although they have varying levels of exposure to the pet market, growth has been solid.

Company 2018 Revenue TTM Revenue Growth

Chewy

$3.5 billion

$8.1 billion

130%

Petco

$4.4 billion

$5.5 billion

24%

Idexx Laboratories

$2.4 billion

$3.1 billion

27%

Zoetis

$6.3 billion

$7.4 billion

18%

Data source: Morningstar. TTM = trailing 12 months.

Not all growth is created equal

Growth is just one part of the story. For investors to benefit, a company needs to have some of those sales eventually drop to the bottom line. Each company is at a different stage in its life, so it's hard to find a metric to compare apples to apples. Gross margins can differentiate the businesses before all of the costs for marketing, distribution centers, taxes, and the like get factored in.

Here, Chewy lags. That said, it is gaining profitability as its top line grows -- a sign that it is scaling and should deliver more profit as the business expands. Zoetis and Idexx Labs stand out. Unlike retailers, they each provide products and services that are hard to substitute. That results in less price sensitivity from customers, as well as more reliable recurring revenue.

Chart showing gross profit margin for Chewy, Petco, IDEXX, and Zoetis since 2017.

CHWY Gross Profit Margin data by YCharts

In the case of these four companies, gross margins are a good indicator of overall profitability. Chewy has earned only $0.02 per share over the last 12 months. Its profit margin is basically 0%. Petco is only marginally profitable, converting about $0.015 of every dollar into earnings for a profit margin of about 1.5%.

Idexx and Zoetis are in a different league, boasting profit margins of 24% and 26%, respectively. Idexx's penetration into veterinary diagnostics and Zoetis' large production animal health unit -- 44% of its sales -- provide safety from those low margins in the consumer retail sector.

The entire pet space is set up for success

Investing in the animal spending category doesn't have to be difficult. A Bank of America survey found that 37% of Americans adopted a pet during the first six months of the pandemic. That increases the percentage of U.S. households that own a pet to two out of every three. Clearly the growth will continue to be in the companion animal segment of the industry.

Unfortunately, the two pure play companies -- Chewy and Petco -- have some fleas. The former barely generates profit even when calculating earnings before interest, taxes, depreciation, and amortization (EBITDA) -- a lenient substitute for cash flow. The latter has 10 times more debt than free cash flow. Not an enviable financial position.

Both Zoetis and Idexx have impressive profit margins and derive a significant portion of revenues from the pet market. But it's hard to choose between them. The difference comes from the combination of growth and profitability. Here, Idexx stands head and shoulders above its larger peer thanks to its vet-focused software applications.

Stick with the strongest company

We saw how revenue expanded since the beginning of 2018. But the operating margin of Idexx also expanded 35% over that time. It grew 10% for Zoetis. That's a relationship where faster sales are driving ever more profitability for Idexx. For shareholders, it means the ceiling for profits is nowhere in sight. And Wall Street tends to underestimate how high that ceiling can be over the long term. 

There might not be a wrong choice for an investment in the booming pet industry. But adding up the numbers points to Idexx Labs as the company with the best risk-reward ratio of the bunch. Trading at 18 times sales, it isn't cheap. But it never has been. Shares have risen 245% since the March 2020 lows compared to 91% for the S&P 500 index. I expect it to continue outperforming in the years ahead.