But there's a key contrast between these companies' long-term growth opportunities, according to Macquarie analyst Ben Schachter.
"Virtually every opportunity that GOOG invests in is going to be structurally lower margin than its core search business, whereas virtually every opportunity that AMZN invests in is going to be structurally higher margin than its core ultra-low margin retail business," he wrote in a note to clients.
In a sense, Alphabet is a victim of its own success. In 2017, the operating margin for Google (excluding long-term bets) was more than 30 percent, which is where it's hovered for years. And this figure includes businesses like cloud and hardware, which probably have a much lower margin than its core advertising business (Google does not break out operating profit or loss for these sub-businesses).
So in all likelihood, any new business it tries to conquer will have a lower profit margin.
Amazon, meanwhile, has famously run its retail business on a razor-thin margin -- it booked a tiny operating loss on $160 billion in revenue in 2017 -- so if it can win in other areas it will almost certainly deliver higher margins over time. That's already happening with its fast-growing cloud business, which had a profit margin of 25 percent (earning $4.3 billion on $17.5 billion in revenue) in 2017.
Macquarie raised its price forecast for Amazon and predicts it will be the first trillion-dollar company. It maintains an outperform rating for Alphabet.
"GOOG is clearly still doing the right thing and investing for the future, but that is a lower margin future," Schacter wrote, while noting that Alphabet has always focused more on incremental operating profit than margins.