F. W. Woolworth Co., the largest U.S. variety chain store operator, yesterday reported second-quarter earnings declined 95.2 percent from the same period a year ago, while earnings for the half were down 10.1 percent.

Earnings for the six months ended July 31 would have been worse except for a tax refund.

"Although we see no conclusive indications that the deterioration of the domestic economy has ceased, we are hopeful that the worst of the year-to-year operting comparisons are now behind us," said Edward F. Gibbons, Woolworth chairman and chief executive.

Earnings in the second quarter were $1 million (1 cent a share) on sales of $1.7 billion, compared with earnings of $21 million (69 cents) on sales of $1.59 billion in the same period a year ago.

Earnings for the first half were $26.8 million (85 cents) on sales of $3.21 billion, compared with earnings of $29.8 million (96 cents) on sales of $2.97 billion in the same 1979 period.

First-half results this year included $20 million (67 cents) for a cash refund of advance corporation taxes received in the first quarter as a result of a tax treaty between the United States and Great Britain.

Gibbons said that in the second quarter, satisfactory sales gains were achieved only by Woolworth stores in the United States and Mexico and by Kinney shoe stores in Canada. He said that all units, except Woolworth's Mexican subsidiary, suffered a decline in operating income.

Quaker Oats Co. earned $4.55 a share in the year ended June 30, up from $4.01 a year earlier, but high interest costs and foreign currency transaction losses slashed final-quarter profits in spite of better sales.

The fourth-quarter profit was $1.01 a share against $1.06 a year ago.

Net income for the year was $96.4 million on sales of $2.4 billion compared with $84.5 million the previous year on sales of $1.97 billion. Net for the final quarter was $21.6 million on sales of $586.7 million compared with $22.1 million the previous year on sales of $497.7 million.

Chairman Robert D. Stuart Jr. said the gains chiefly reflect U.S. grocery product operations, which were up 10 percent in both sales and earnings on the year. International grocery sales were up 41 percent. Toy and game and mail order sales were 37 percent higher and chemicals had a 28 percent gain with the best increase in Europe.

The restaurant and institutional feedig division also had a sales gain, but its earnings were off.