A customer pushes a cart outside a Staples store in Torrance, Calif. (Patrick T. Fallon/Bloomberg)

Staples announced Wednesday that it will acquire Office Depot for $6.3 billion, a move that underscores how much harder it’s getting to make a big-box store viable in the e-commerce era.

The deal comes as the retailers are seeing massive upheaval in their industry: Demand for paper-based office supplies is dwindling as more business functions become digital, and a diverse array of competitors, including Amazon and Wal-Mart, are selling these kinds of goods.

With their sprawling square footage, big-box stores typically have very expensive leases and require a large staff, expenses that are harder to grapple with as more shoppers move online. The math eventually didn’t work for onetime big-box giants such as Circuit City, Linens ‘N Things and Borders.  Even giants such as Wal-Mart and Target, while sticking with their big-box formats, are looking to smaller-format versions of their stores for future growth.

Staples chief executive Ron Sargent said Wednesday that a merger would help the brands compete more effectively.

“I think this is kind of a historic opportunity to reset pricing,” Sargent said Wednesday morning on a conference call with investors, a signal that the merged companies would aim to compete more aggressively on price with Amazon. Together, the brands would have about $39 billion in annual sales and about 4,000 stores.

The companies said that they expect to dramatically cut costs on advertising, marketing and administrative functions if the merger is completed.

“We expect to recognize at least $1 billion of synergies as we aggressively reduce global expenses and optimize our retail footprint,” said Sargent. “These savings will dramatically accelerate our strategic reinvention, which is focused on driving growth in our delivery businesses and in categories beyond office supplies.”

Both stores say they plan to continue with previous plans to close some of their outposts. Staples said last year it would close 225 of its stores by mid-2015; Office Depot has said it would close 135 stores this year. While executives did not say exactly how the proposed merger would affect their store count, they said that about half of Staples stores are within five miles of an Office Depot store, giving them good reason to rethink the quantity and location of many of their outposts.

The companies said their talks began in September and that they hope to complete the merger by the end of 2015.  The proposal is awaiting the review of federal regulators, who blocked a merger between the retailers nearly two decades ago.  Still, Office Depot was permitted to buy OfficeMax in 2013, a signal that the emergence of new e-commerce players in the office supplies market may have changed the way such a deal would be viewed.

“It’s really not our place, nor could we even possibly handicap what the FTC might say,” Sargent said.

Staples says much of its revenue –46 percent last year — came from products that were not office supplies, and they expect that share to grow to 48 percent this year.  In other words, Staples, too, is a much different store than it was the last time the FTC weighed a potential merger.

Executives said they plan to keep Staples’ headquarters in Framingham, Mass., and “plan to evaluate maintaining a presence” in Boca Raton, Fla., where Office Depot’s headquarters are located. Sargent is to be the chief executive of the merged companies.