NEW YORK — J.C. Penney’s biggest investor, William Ackman, plans to sell his entire stake in the struggling department store operator for about $504.4 million – a loss of around $470 million from what he paid for it.Two weeks ago, Ackman resigned from Penney’s board as part of a deal to resolve an unusually public battle between the activist investor and the retailer. Ackman’s Pershing Square Capital Management disclosed in a regulatory filing late Monday that it was going to sell its nearly 18 percent interest — or 39.1 million shares. On Tuesday, Ackman said the shares will be priced at $12.90 each, about 3 percent below Monday’s $13.35 closing price. Penney shares, which traded higher for much of the day, closed down 18 cents Tuesday at $13.17. Ackman acquired its stake in J.C. Penney in 2010, according to a filing with the Securities and Exchange Commission. He paid about $25 per share, Pershing said Tuesday. Penney shares have lost nearly 70 percent of their value since early February 2012, when investor enthusiasm over former CEO Ron Johnson’s retail strategy pushed the stock to around $43. That includes a 32 percent drop in value so far this year. The beleaguered chain is trying to recover from a botched transformation plan spearheaded by its former CEO that led to disastrous financial results. The board ousted Johnson in April after 17 months on the job and rehired Mike Ullman, who had been CEO of the Plano-based retailer from 2004 to late 2011.Ackman resigned from the board Aug. 13, after he went public with statements saying that he’d lost confidence in Penney’s board and that Chairman Thomas Engibous should be replaced. Ackman and the board were also bickering over how quickly the company should replace Ullman, who is expected to be an interim CEO.Ackman joined the board in February 2011 and pushed the board to hire Johnson, a mastermind of Apple’s successful stores. Under Johnson’s leadership, Penney got rid of most sales in favor of everyday low prices. He also brought in hip new brands and planned to remake the store as an indoor mini-mall of sorts with 100 different in-store shops aimed at wooing trendier, more affluent shoppers. But those efforts alienated the company’s loyal customers.Penney ended up losing nearly $1 billion and 25 percent of its revenue in the fiscal year ending Feb. 2, the first year of the transformation plan. Since returning to Penney’s helm, Ullman is bringing back basic merchandise like loose-fitting khakis and restoring frequent promotions. But sales declines and losses continued into the first and second quarters as Johnson’s legacy continued to cast a shadow on the results. J.C. Penney won’t receive any proceeds from Ackman’s stock offering, which is targeted to close Aug. 30.