Both Starbucks (SBUX 0.52%) and Zillow Group (Z -0.05%) (ZG -0.24%) have given their shareholders good reasons to cheer lately. Starbucks' stock has gained almost 50% over the last year, while Zillow's shares have nearly tripled. Both handily beat the S&P 500's 27.5% increase.

It is always nice to see strong performance, since it indicates other investors have confidence in the company's future. However, while that's encouraging for both, it is time to discover which one is more deserving of your investment dollars.

Which to buy? How to make a great decision.

Image source: Getty Images.

Starbucks

Starbucks is best known for selling premium coffee, but it also sells other drinks and select food items. While the pandemic hurt last year's results due to restaurant closures and restrictions, its loyal customers are returning.

During fiscal 2020, which ended on Sept. 27, revenue fell from $26.5 billion to $23.5 billion. Management estimates that the pandemic cost the company about $5.1 billion in sales. Same-store sales (comps) were down by 14% for the period but improved throughout the year as the company adapted to the rough conditions by providing curbside pickup, mobile ordering, and delivery. Comps dropped by 9% in the fourth quarter versus a 40% decline in the prior period.

In the first quarter, comps were down by 5%. But management remains upbeat, and this seems to be warranted based on how the company has held up. China, the first region affected by the pandemic, saw comps rise by 5% as customers spent more money at the restaurants. This remains a growth area, with management planning to open about 600 restaurants in the country, accounting for more than half of the 1,100 net new locations. 

Starbucks also expects the U.S. and China, its two largest regions that account for more than 60% of its restaurants, to rebound strongly. For the year, it anticipates U.S. comps will increase by 17% to 22% and comps at its China locations to go up by 27% to 32%.

In addition to its growth potential, the stock will also appeal to those looking for dividends. Starbucks has increased payments for 10 straight years. Its most recent action was raising its November payout by 10% to $0.45. The dividend yield is 1.7%.

Zillow

Zillow has become synonymous with its database of homes for which it provides estimated fair value. But it is much more. Through its popular websites, the company allows agents and other real estate professionals to advertise their services, provides rental and sale listings, and offers mortgage services. In addition to its namesake brand, it also operates Trulia and StreetEasy.

With 9.6 billion visits to its sites, up 19%, Zillow is proving very popular. Fortunately, management has been able to turn this into growing revenue. Despite the pandemic, the housing market was particularly strong overall last year as people relocated out of cities, and low mortgage rates helped fuel home buying and refinancing. Zillow, with its broad reach and expansive offerings, was a prime beneficiary, posting strong results. Its revenue rose by 22% to $3.3 billion in 2020.

Plowing its earnings into growth initiatives, Zillow doesn't pay any dividends.

The decision

Zillow's fortunes are inextricably tied to the economy and real estate cycle. While it does make money from rentals, a housing downturn will undoubtedly hurt the company's results. Right now, the market is doing well, but it will level out at some point.

Starbucks has proven its mettle over the years. While results typically slip during a downturn (comps were down 3% and 6% in 2008 and 2009, respectively), with governments and companies distributing vaccines, the worst appears behind us. With its dividend to comfort you during tough times, Starbucks edges out Zillow.