Du Pont Co. and Union Carbide Corp., two major chemical companies, reported yesterday their earnings declined in the third quarter, in part because of the recession.

W.R. Grace, however, reported a 53 percent rise in third-quarter earnings, at record levels.

Du Pont said in Wilmington, Del., that it earned $89.1 million (58 cents a share) in the third quarter, down from $252 million ($1.72) in the same period of 1979. Revenues rose from $3.17 billion to $3.21 billion.

Union Carbide said in New York that its earnings for the quarter were $153.8 million (2.30 a share). That was up from $149.4 million ($2.27) in the same 1979 period, but the company noted that the increase was due to an accounting change and said that on a comparable basis earnings were down 14 percent. Sales rose from $2.33 billion to $2.38 billion.

Du Pont Chairman Irving S. Shapiro said his company's "performance in the third quarter of 1980 reflected the sharp decline in the U.S. economy and weakening business conditions in Europe."

In addition, significant increases in raw material and energy costs since last year have not been fully recovered by selling price increases," he added.

Shapiro indicated the company's economic picture may improve during the coming months.

Du Pont said its sales increase came from price increases and that volume was down by 11 percent compared with the third quarter of 1979 and 9 percent from the second quarter of this year.

Union Carbide Chairman William S. Sneath said the third-quarter results were "encouraging in that our earnings were above those of the second quarter of 1980."

Union Carbide in January changed the way it accounted for depreciation and capitaliation of interest payments. It said third-quarter earnings for 1979, on that basis, would have been $178.1 million ($2.71).

Du Pont said its earnings for the nine-month period were $510.7 million ($3.43), down from $732.8 million ($5.01). Revenues rose to $10.15 billion from $9.40 billion.

W.R. Grace & Co., meanwhile, said third-quarter earnings were up 53 percent to a record $67.98 million ($1.45 a share) from $44.54 million (98 cents) a year earlier.

Sales reached a record $1.49 billion, an increase of 15 percent from $1.29 billion in the same 1979 quarter.

For the first nine months of 1980, net income was $216.4 million ($4.64), up 33 percent from $162.8 million ($3.58) in the comparable 1979 period. Sales were up 15 percent to $4.39 billion from $3.82 billion in the first nine months of last year.