In its fourth-quarter earnings report, Target (NYSE:TGT) management gave investors a lot of details about the progress of its digital business. Online sales increased 31% during the quarter compared to last year, and topped $5 billion for the year. Digitally originated sales accounted for over 10% of the retailers total in the fourth quarter.

On the earnings call, COO John Mulligan gave some additional information about how Target is leveraging its stores to fulfill online orders. "This year during our fourth quarter, stores fulfilled nearly three of every four orders, effectively doing the work of 14 fulfillment centers," he said. "That means we didn't have to spend nearly $3 billion on new warehouses over the past few years to accommodate that growth."

That's a substantial savings considering Target's operating cash flow totaled less than $6 billion last year. But the real cost savings are found in the company's gross margin.

A Target employee bringing an order to a customer's car curbside.

Image source: Target.

Where that $3 billion went

While Target might have saved $3 billion on warehouses and fulfillment centers thanks to its stores, that money isn't falling to the bottom of the cash flow statement. In fact, the company spent $3.5 billion on property and equipment last year. That's up from $2.5 billion in 2017.

The capital expenditures are part of Target's plans to invest $7 billion starting in 2017 to remodel stores, expand its small-store format, drive online sales growth, and lower its prices. Management expects another $3.5 billion in capital expenditures in 2019, putting its three-year stack closer to $10 billion.

While the store remodels are done to improve in-store sales by improving sight lines and customer flow, they're also mindful of the growing importance of Target's stores in fulfilling online orders. What's more, investments in its supply chain ensures Target stores inventory stays well stocked. Using capital expenditures to improve store formats and supply chains instead of building warehouses appears to be a smart move.

Keeping fulfillment costs in check

Over the last few years, brick-and-mortar retailers have seen their costs balloon as they push to grow sales through digital channels. Those costs are best reflected in declining gross margins, since online sales include fulfillment costs in their cost of goods sold.

Target's gross margin fell to 25.7% in the fourth quarter. The company had a gross margin of 29.3% for the full year of 2016. Likewise, Walmart (NYSE:WMT) has seen its gross margin fall as online sales become a bigger part of its business. Gross profit margin for Walmart's U.S. operations declined 27 basis points in the fourth quarter, slightly less than Target's year-over-year contraction.

Walmart is also making considerable investments to use its stores to fulfill online orders. With much of its online sales growth coming from grocery, store pickup is an essential part of its digital strategy.

Fulfilling digital orders from stores significantly reduces fulfillment expenses for Target. Items shipped from stores cost an average of 40% less to fulfill compared to orders shipped from warehouses upstream, according to Mulligan. Items picked up from stores, including Target's expanding curbside pickup program, cost 90% less to fulfill. Continued growth in store-fulfilled orders ought to reduce gross margin pressure.

Importantly, management notes store fulfillments aren't cutting into in-store sales growth. "In-store sales per square foot have grown at a 4% rate per year [since 2016], which means our Target stores can support incremental growth from Target.com without hurting in-store sales," Mulligan told analysts.

Target's decision to remodel its stores and invest in its supply chain instead of building out warehouses has enabled it to grow the business better than if it had invested in digital sales alone.