Target TGT is best known for its nearly 1,800 big-box stores. But it’s betting its future on grabbing its share of digital commerce.

This fiscal year, Target will spend about $2.1 billion on capital projects, about the same as it did in 2010. But back then, the bulk of the spending went to new stores and remodels. This year, company executives said at a meeting with Wall Street analysts to unveil its five-year plan, $1 billion of that budget, or just about half, on its digital capabilities, cognizant of how much shopping, from browsing to actually buying, actually goes through smart phones.

Target CFO John Mulligan told Wall Street he expects sales at stores to rise 1%, and for digital sales to rise 40% this year.

The discount retailer, which was slow to adapt to the rise of e-commerce—digital sales represent about 3% of total sales. In 2014, Target rewrote 75% of the code in its e-commerce platform, and now its website is considered by e-commerce experts to be up to par with its rivals and in some areas head, namely mobile shopping.

It is planning to enable 350 of its stores to ship online orders by October 2015 from 139 now to speed up delivery and better compete better against Amazon.com AMZN and Wal-Mart Stores WMT . Last week, Target announced lowered the minimum online order size needed to get free shipping by half to $25, undercutting Wal-Mart, Amazon.com and Best Buy BBY

All this will pressure its gross profit margins, lowering it by 0.6 percentage points over the next five years. But Mulligan said it was worth it: shopper who navigate between stores and Target’s digital channels shop nearly three times as much.

As detailed in a cover story in Fortune, Target is striving to stop being what its executives call a “fast follower” in e-commerce—a company that lets others set the agenda and quickly mimics their pricing—and take the lead. Target showed its newfound aggressive this past holiday season by being the first in its peer group to offer free shipping on all orders regardless of size, a sharp contrast with earlier holiday seasons when the retailer took its cues from the competition and was a laggard in e-commerce.

The company also detailed plans to save $2 billion in the next two years including the elimination of “several thousand” positions.