Texaco Inc., the nation's third-largest oil company, said yesterday that its first-quarter earnings were virtually unchanged from a year earlier, but that it avoided a decline only because of extraordinary gains such as proceeds from the sale of stock.

Among other large oil companies reporting yesterday:

Occidental Petroleum Corp. said its first-quarter earnings also were boosted by one-time-only gains, rising 8.5 percent from a year earlier because of a large tax credit and the sale of some petroleum properties.

Standard Oil Co. (Ohio) said its profit fell 10 percent because of lower oil prices and higher exploration expenses. British Petroleum Co. PLC owns 55.23 percent of Sohio.

Meanwhile, Delta Air Lines Inc. reported a 22 percent decline in quarterly profits, and Republic Airlines Inc. said it posted a quarterly profit compared with a loss a year ago.

A year ago, major oil companies were reporting sharply higher profits as the economy was expanding at a robust pace and as cold weather pushed up demand for heating oil. But so far this year, most major oil companies have reported lower profits for the first quarter as economic activity cooled off and prices fell on world oil markets.

Texaco, with headquarters in White Plains, N.Y., said its first-quarter earnings came to $320 million ($1.28 a share) against $321 million ($1.25) a year earlier. Revenue rose 11.1 percent to $12 billion from $10.8 billion.

Occidental Petroleum, based in Los Angeles, said its profits rose to $115.7 million (45 cents a share) from $106.6 million (36 cents) a year earlier. Revenue fell 4.5 percent to $3.70 billion from $3.87 billion.

However, $32.9 million of these profits represented tax credits earned from transactions in the past two years that resulted in capital losses to Occidental, which is the nation's ninth-largest oil company.

Without the one-time-only tax gain, profits would have declined by 22.3 percent.

The company also reported an extraordinary gain of $66.5 million from the sale of petroleum interests in the North Sea and in California.

In Cleveland, Sohio said first-quarter earnings fell to $343 million ($1.46 a share) from $381 million ($1.54) a year earlier. Revenue for Sohio, which is the No. 12 oil company, rose 10.3 percent to $3.2 billion from $2.9 billion.

Analysts had predicted that most large oil companies would suffer a profit slump in the opening 1985 quarter because of surplus refining capacity and a gasoline price war early in the period.

Among the smaller oil firms, Pennzoil Corp. had a 17.1 percent decrease in earnings for the first quarter and Murphy Oil Co. recorded a 23 percent drop. Delta Air Lines Inc. said that although profits for its fiscal third quarter fell from a year earlier, when earnings were bolstered by a one-time gain, income from operations more than doubled.

Delta, which is based in Atlanta, said net income in the quarter ended March 31 fell to $41.2 million ($1.03 a share) from $52.8 million ($1.33).

The fiscal 1984 results included an after-tax gain of $37.6 million on the sale of aircraft. The 1985 results did not include any aircraft sales.

Delta's income from operations rose to $65.1 million from $31.3 million a year ago.

Revenue rose 8 percent to $1.17 billion from $1.08 billion.

Nine-month net income rose 69 percent to $175.3 million ($4.39) from $103.9 million ($2.61) a year ago, as revenue rose to $3.41 billion from $3.12 billion.

The fiscal 1985 results included an after-tax gain of $49.7 million from the sale of aircraft, while the 1984 totals included a gain of $54.2 million from such sales. Republic Airlines Inc., based in Minneapolis, reported a profit of $5.3 million (12 cents a share) in its first quarter in contrast with a loss of $4.1 million a year ago.

The latest results included a $6 million gain on the sale of property, equipment and lease rights. The company has been restructuring its routes, increasing service from its hubs in Detroit, Minneapolis-St. Paul and Memphis.

Republic's revenue slipped 3.6 percent to $380.9 million from $393.6 million a year ago, but its expenses tumbled 5.5 percent to $375.6 million from $397.7 million.

Its operating profit slipped to $18.0 million from $18.5 million a year ago.