The world's largest consumer goods company, whose products like Tide detergent and Gillette razors are in 98 percent of U.S. households, in recent years has lost business to competitors as it grew too fast overseas and kept prices high.

But on Friday P&G reported that its fiscal second quarter profit more than doubled as the plan the company launched last year to lower costs and roll out new products boosted its bottom line. It is the second quarter in a row that P&G beat Wall Street estimates.

"We have more work to do, but the underlying trends are improving," said CFO Jon Moeller in a call with analysts.

The results signal a change for P&G, which like many U.S.-based companies, has been focusing on growing its business in places such as China and India as growth in more developed regions like North America have slowed. But while competitors lowered prices, P&G took for granted that many of its products are household names in some regions, and the company held its ground on pricing. As a result, P&G lost market share in more than half of the categories in which it sells products.

Investors, most notably activist William Ackman, who took a 1 percent stake in P&G in July, have been vocal about the company's need to streamline operations and grow market share globally.

P&G in February launched a plan to focus on the company's 40 top businesses, 20 biggest new products and 10 most profitable emerging markets. It also rolled out cost-cutting measures aimed at saving $10 billion by fiscal 2016. Later in the year, P&G lowered prices for laundry detergent, toothpaste and other products in the U.S., and cut jobs.

P&G's quarterly results show that the strategy is finally working. The company, which is based in Cincinnati, held or grew market share in businesses representing almost 50 percent of sales during the fiscal second quarter that ended on Dec. 31.

Another good sign: The positive results come from both developed markets as well as emerging markets. For instance, in China, a key emerging market that has been facing slowing growth, P&G held or grew market share in about half of the categories it competes in, while market share improved for two-thirds of its portfolio there.

"We're really seeing growth both in developed markets and developing markets," said CEO Bob McDonald said in a conference call.

The growth was driven in part by recent product launches that include 3D White toothpaste in Brazil and the introduction of a low-priced razor Gillette Guard in Egypt. In the U.S., Tide Pods drove the improvement in the detergent category and Cascade dish detergent, Gillette Fusion razors and Crest toothpaste were other strong sellers.

Lower prices in North America helped spur market share gains for products such as Gain detergent, dishwashing liquid such as Cascade and Gillette razors, which gained 2 points of market share to boast 74 percent in the U.S. male blades and razors category.

P&G's cost-cutting measures also boosted results. The company said a plan to cut 10 percent of its non-manufacturing workforce, or 5,700 jobs, by the end of the fiscal year is 95 percent complete — about four or five months ahead of schedule. The company also plans to cut 2 to 4 percent more jobs per year in fiscal 2014 to 2016.

"We remain confident that our focus areas ... are the right ones, and should generate over time the kind of earnings progress that will put us among the best in our industry," Moeller, P&G's CFO, said in the conference call.

During the fiscal second quarter, P&G earned $4.06 billion, or $1.39 per share, up from $1.69 billion, or 57 cents per share, in the same quarter last year. Excluding special items, it earned $1.22 per share. Revenue increased 2 percent to $22.18 billion. Analysts polled by FactSet expected earnings of $1.11 per share on $21.86 billion in revenue.

Based on the better-than-expected results for the first half of the year, P&G said it expects fiscal 2013 core earnings of $3.97 to $4.07 per share on revenue growth of 1 percent to 2 percent. It previously predicted an adjusted profit of $3.80 to $4 on flat revenue growth to up to 1 percent. Analysts expect earnings of $3.97 per share.

On the news, P&G shares closed up $2.78, or nearly 4 percent, to $73.19, after reaching a 52-week high of $73.24.

Analysts had mixed reactions to the upbeat report. Wendy Nicholson, an analyst at Citi Investment Research, wrote in a note that P&G's strategy seems to be working.

"We are optimistic that this trend of improvement will continue, especially given that many of P&G's new product launches have just recently, or have yet to, hit the market," Nicholson wrote in the note.

Erin Lash, an analyst for Morningstar, was more cautious. She said that the cost-cutting moves P&G has put in place have boosted results, but the effect might be temporary.

"P&G is benefiting from their stepped up cost saving efforts," she said. "We can't deny those are gaining traction, but we question the sustainability of their efforts.

P&G's results come after its competitor Unilever on Wednesday reported that its full-year net income rose 5 percent, helped by higher prices and cutting costs.

The Dutch company, which makes consumer products such as Dove soaps and Magnum ice cream, recently has been outperforming its larger rival.