Final second-quarter earnings reports by major oil companies yesterday showed that the April-June period this year was the most profitable for those months in industry history.

With Texaco Inc., the third-largest oil firm, posting an increase of 132 percent, and No.11 Sun Co. reporting an advance of 57 percent, all of the 20 biggest petroleum companies (and 23 of the top 26) had reported secondquarter results by last night.

According to a Washington Post compilation, second-quarter profits of the 23 reporting companies totaled $5.47 billion - an increase of 66 percent over profits of $3.28 billion reported for the same months last year, when oil prices had been depressed by an oversupply of crude oil.

In contrast, a Wall Street Journal survey of 367 industrial companies that have reported on second-quarter results showed an average increase of 20.3 percent. Only mining and nonferous metal businesses reported a larger percentage gain - 91.8 percent - than that of the oil industry.

Morever, Wall Street analysts have forecast that petroleum profits will continue at high levels during the rest of 1979 and for next year, even though national recession will trim most corporate profits.

Although levels of spending for exploration and expansion by oil firms are at record levels, soaring world crude oil prices have brought about sharp increases in the petroleum firms' revenues.

Crude prices of the Organizationof Petroleum Exporting Countries are now 60 percent above last December's level, according to a Chemical Bank assessment. And nationwide gasoline retail prices have jumped 40 percent over the same period.

A number of oil company executives noted this week the difference between a higher rate of increase in OPEC prices and other costs than for prices at gasoline pumps. An Exxon official said "we deliberately held back somewhat in our pricing in the first six months. We exercised some restraint."

Shell Oil President John Bookout said that with costs rising so rapidly, it is unlikely that profits from sales of gasoline and other products will be up for the full year. "While gasoline and other refined product prices increased substantially for the first half of the year, price increases have been offset by higher costs and lower volumes . . . " Bookout asserted.

Similarly, Exxon Chairman Clifton Garvin said costs for the recent quarter and six months rose "much more than selling prices." Exxon's secondquarter refining and marketing earnings were less than a half of those in the 1978 period, he added. At the same time, Exxon wrote off some of its investment in the search for oil off New Jersey, in the Atlantic Ocean, and that trimmed reported profits.

With Carter administration pressure being applied on Congress for passage of a "windfall profits" tax, the oil companies have become an obvious target with their glowing earnings statements - even if many of the companies' gains were the result primarily of foreign operations or a substantial recovery from a depressed period last year.

And the controversy is expected to continue because oil profits will benefit in future months from higher domestic crude oil prices, under phased decontrol.

"We think the political rhetoric may get worse but we don't think in the final analysis anything very serious is going to come out of that," said analyst Bill Randol, of Blyth Eastmen Dillon, of the tax legislation and proposals to ban non-energy acquisitions by oil firms.

Texaco Chairman Maurice Granville emphasized yesterday that his firm's sharp 1979 profit increase - the greatest among the biggest firms - partly show that earnings last year were "abnormally low."

Second-quarter profits were $365.4 million ($1.35 a share) compared with $157.4 million (58 cents) in the 1978 period, for a gain of 132 percent as sales rose 25 percent to $8.5 billion. Granville noted that Texaco had earned $222.7 million (82 cents) in the similar 1977 period.

For the first six months, Texaco earnings were up 105 1/2 percent from last year to $672 million ($2.48 a share) compared wtih $327 million ($1.21) and sales climbed 22 percent to $17 billion. Granville made these points:

Texaco profits had been reduced in 1978 because of generally weak prices worldwide, inflationary cost increases and large losses from foreign currency translation.

The firm's rate of return on investment was at an annual rate of 6.6 percent in the first half, on total assets of $21 billion. According to government data, the return on assets for all U.S. manufacturing firms last year was 7.9 percent.

Texaco's return on average stockholkers' equity (stock investment) in the firm of $9.6 billion, was 14 percent; the average return on equity for all manufacturing industries was 16.5 percent last year, not counting petroleum, according to regular Citibank surveys.

"The company's earnings are not excessive in relation to the large and growing amount of funds needed for reinvestment in the business, for capital and exploratory expenditures and for other increasing cash needs," Granville stated. "In the final analysis," only profits can generate such funds, he added.

Sun. Co., of Radnor, Pa., said yesterday its second-quarter profits were $158.5 million ($2.74 a share) compared with $101.2 million ($1.74) a year ago, a gain of 57 percent. Sales rose from $1.86 billion to $2.5 billion.

Getty Oil Co., of Los Angeles, said second-quarter profits rose to $139.5 million ($1.70 a share) from $56 million (67 cents), and American Petrofina Inc., of Dallas, reported secondquarter earnings of $16.2 million ($1.52) vs. $6.2 million (58 cents). CAPTION: Graph, Big Oil Profits, The Washington Post