Nvidia Corp.'s (NVDA) fiscal second-quarter loss - its fourth in the past five quarters - narrowed as the graphics-chip maker said it is seeing a recovery across its product line-up.

Shares jumped 5% to $13.78 in after-hours trading as the results topped expectations and the company forecast revenue this quarter would top analysts' estimate. The stock has more than doubled from a four-year low last November.

Nvidia - which makes chips that allow computers to play movies and generate images in videogames - saw demand for its high-performance chips slump as sales of computers and other tech products dropped amid the recession. Particularly hard hit were its high-performance - and high-margin - graphics cards, which hurt profits.

But in this latest period, sales picked up in nearly all of its markets, excluding only graphics cards used in notebooks.

"We experienced broad growth in almost every segment of our business," said Nvidia Chief Financial Officer David White. White added that two of Nvidia's newest products, its Tesla graphics chip and its Tegra low-power chip for mobile devices, have begun contributing to revenue in the quarter.

As such, the company predicted third-quarter revenue 5% to 7% above the latest quarter's $776.5 million. Analysts estimated $767 million, down 1.2% sequentially.

"Product demand is improving, and our strategic investments are leading to new growth," said Chief Executive Jen-Hsun Huang in a prepared statement.

In recent weeks, many chip makers have said the market has bottomed, and Nvidia is among the companies likely to benefit from the higher technology spending expected when Microsoft Corp. (MSFT) launches the Windows 7 operating system this fall.

In the quarter ended July 26, Nvidia reported a loss of $105.3 million, or 19 cents a share, compared with a year-earlier loss of $120.9 million, or 22 cents a share.

The loss included a $119.1 million charge covering further costs to fix a flaw related to some of its graphics chips discovered last year. The company had previously set aside $196 million for customer repair costs.

Nvidia said no additional chips are flawed, but costs will be higher to repair them.

Excluding inventory and other charges, earnings fell to 7 cents a share from 13 cents.

Revenue dropped 13% to $776.5 million, far higher than Nvidia's May forecast of a 5% gain from the first quarter's $664.2 million.

Analysts expected, on average, a loss of 2 cents a share on revenue of $714 million, according to a poll by Thomson Reuters.

Gross margin rose to 20.2% from 16.8%, but was far below the company's forecast of 32% to 34%. But inventories are down 48% so far this fiscal year.

The second-quarter results were impressive, said Wedbush Morgan analyst Patrick Wang. He added, however, that Nvidia could face challenges through the rest of the year as it battles rival Advanced Micro Devices Inc. (AMD). ADM could have an edge by bringing out the first chip to work with the latest version of DirectX, widely-used software that handles multimedia, Wang said.

"The question is looking forward from here, how they are going to improve," he said.

-By Jerry A. DiColo, Dow Jones Newswires; 212-416-2155; jerry.dicolo@dowjones.com

(Kathy Shwiff contributed to this report.)