Shares of Etsy (ETSY 2.75%), the online arts-and-crafts fair stock, raced ahead 6.8% through 1:15 p.m. ET Wednesday after reporting better-than-expected Q2 sales this morning -- but worse than expected earnings.

Heading into the report, analysts forecast Etsy to earn $0.49 per share on $647.6 million in sales. Sales exceeded expectations at $672.7 million, but earnings were only $0.25.

Simple green arrow going up.

Image source: Getty Images.

Etsy's Q2 earnings

Etsy's gross merchandise sales declined 5% in Q2, but thanks to improved advertising sales on the Etsy website, revenue for the company actually grew 4%. The bad news is that the profit margin Etsy earned on these revenues declined steeply, falling to 4.3%. As a result, net income deteriorated, and the company earned only $28.8 million in Q2 -- down 46% year over year.

Stock buybacks helped to mitigate the damage by concentrating profit in fewer shares outstanding, but earnings per share still declined 39%.

Is Etsy stock a buy?

Investors don't seem upset by the decline in profit, focusing instead on the growth in revenue -- and they may be right to be optimistic.

On one hand, yes, Etsy's profit-and-loss statement is a mess, with generally accepted accounting principles (GAAP) net income down by two-thirds from the high hit in 2021, and trailing profit now barely half what Etsy earned last year.

But on the other hand, Etsy's free cash flow remains intact, with $671 million in cash profit earned over the last 12 months. On a $6.8 billion market capitalization, that's a price-to-free cash flow ratio of barely 10x.

With Etsy's FCF forecast to grow more than 40% over the next four years, that price seems fine. It's not a screaming bargain, true, but 10x FCF for 10%-ish annual growth seems more than fair to me. Therefore, Etsy stock is a buy.