By Heather Haddon

Starbucks Corp. said it would close some traditional cafes and open more to-go locations as the chain known for spreading coffee shops across the globe bets more on convenience and speed.

Shares fell nearly 4% in morning trading as Starbucks also detailed the financial impact from Covid and updated its quarterly and annual outlook.

Starbucks said Wednesday that it plans to close, renovate or move 400 traditional cafes in the U.S. and Canada in the next 18 months. For every store that is closed, at least one alternative location will open, executives said. The company said it aims to open 40 to 50 pickup-only stores in the next year-and-a-half. Starbucks owns about 10,000 stores in its Americas division, which includes the U.S. and Canada.

Starbucks supercharged the establishment of coffee shops across the country that aimed to be a "third place," where people could commune outside home and work. But in recent years many consumers migrated toward takeaway orders, and the company was planning to change to some smaller store footprints over the next three to five years.

The coffee giant is speeding up that work because of the coronavirus pandemic, CEO Kevin Johnson said. About 80% of sales at U.S. company-owned stores are takeaway, the company said, and Starbucks expects that portion to grow as the pandemic changes commutes and routines.

"We are looking to the future," Mr. Johnson said. "There is a lot of opportunity to thoughtfully reposition these stores at this time."

The company said it expects revenue declines of $3 billion to $3.2 billion because of the pandemic in its current third quarter. The company also guided to a per-share loss of between 64 cents to 79 cents, wider than analysts were expecting.

Starbucks shares recently traded at $79.16. Before Wednesday, the stock had fallen 6% in 2020.

Companies including big retailers and airlines are making longer-lasting changes as the coronavirus reorients daily life in the U.S. As the economy reopens, brands are re-evaluating their stores and how customers want to interact with them.

States have begun to allow more freedom of movement for residents, but many consumers continue to avoid shopping in stores and opt for delivery and pickup options. Many fast-food chains haven't restored sit-down service, relying on sales from busy drive-throughs.

Wendys' Co. said Tuesday that most of its restaurants are offering drive-through and delivery only, even though most states now allow for some dine-in service.

Starbucks closed dine-in service in the U.S. in March. It began to restore limited operations to most of its company-owned stores last month. The bulk of its stores are serving customers through drive-through, delivery and pickup at entryways. Dine-in service remains suspended at most of its U.S. locations.

Mr. Johnson said Starbucks would likely restore in-store service for customers in some U.S. counties in the months ahead. For now, the company is further limiting employee hours to reflect the paired-back U.S. operations. Many workers are expected to decide this week whether to remain working with reduced hours, take a leave of absence or resign.

Starbucks's new format for some of its stores won't result in a drop in overall employment, Mr. Johnson said.

Mr. Johnson said the pandemic has provided an opportunity for Starbucks to re-evaluate its stores -- particularly in big cities, where he expects commercial rents to fall. The company is focusing on New York, Chicago, Seattle, San Francisco and other dense urban areas for its shift to pickup-only locations.

"We think there are a lot of real estate opportunities for us to capture, " he said.

Starbucks said U.S. same-store sales fell 43% in May. Declines have improved from a drop of 63% in April.

Mr. Johnson said the company has had six weeks of same-store sales growth in the U.S. since it restored limited service. The company hopes the U.S. will return to quarterly same-store sales growth early in its next fiscal year.

In China, Starbucks's second largest market and its first to feel the impacts of the virus, 99% of stores are now open, and more than 70% have restored full cafe seating. Same-store sales, while improving, remained down 21% in May, the company said.

Starbucks said it now expected earnings per share of 33 cents to 73 cents for its full fiscal year. Starbucks is reaffirming its long-term guidance of 3% to 4% store growth for the U.S. and Canada. It expects to add a net 300 stores in its fiscal year ending in September.

Write to Heather Haddon at heather.haddon@wsj.com