Two of the nation's big airlines, Trans World and American, which compete on the New York-California route, yesterday reported losses for the fourth quarter.

But two railroad companies, Union Pacific and Burlington Northern, reported big increases in 1980 profits, and gains also were reported by Union Carbide and Nabisco.

Trans World Corp. said a sharply reduced loss for its airline combined with improved profits from its hotel and food divisions to reduce its fourth-quarter loss from year-earlier proportions.

Trans World said it lost $14.7 million on revenues of $1.25 billion in the latest quarter compared with a loss of $43.8 million on revenues of $1.07 billion in the 1979 quarter.

Trans World Airlines cut its loss 47.7 percent to $29.5 million as revenues rose 17 percent to $806 million, the company said.

The parent corporation reported profits of $67.6 million on revenues of $5.02 billion in all of 1980, up fromprofits of $8.6 million on revenues of $4.33 billion in 1979. The 1980 figure includes a gain of $47.1 million from exchange of debentures, Trans World said.

American Airlines Inc. said losses in the fourth quarter and year reflected an anticipated loss on the sale of aircraft, plus lower passenger volume, higher fuel prices and increased competition.

American said it lost $61.5 million in the final 1980 quarter compared with a loss of $3.8 million a year earlier. It said it took a loss of $51.8 million from expected sales of aircraft.

For all of 1980, the company reported a loss of $75.8 million on revenues of $3.82 billion compared with a 1979 profit of $87.4 million on $3.36 billion in revenue.

Union Pacific Corp. said record earnings from three of its four operating companies -- helped by coal production and gains in shipments of bulk commodities -- were responsible for a 4 percent rise in fourth-quarter earnings and a 6 percent earnings jump for 1980.

Union Pacific reported fourth-quarter earnings of $105.2 million (1.09 a share) on revenues of $1.33 billion compared with earnings of $100.8 million ($1.06) on revenues of $1.17 billion in the last quarter of 1979.

For 1980, earnings were a record $404.5 million ($4.22) on revenues of $4.87 billion compared with earnigs of $382.5 million ($4.01) on revenues of $4.03 billion in 1979.

Burlington Northern Inc. reported fourth-quarter earnings of $64.9 million ($1.89 a share) on revenues of $1.1 billion compared with earnings of $50 million ($1.84) on revenues of 900.7 million in the same 1979 period.

Earnings for all of 1980 totaled $222.9 million ($7.55) on revenues of $3.95 billion compared with 1979 earnings of $175.6 million ($6.55) on revenues of $3.22 billion.

BN President Richard Bressler noted strong gains by both energy and rail operations, including increased volume of coal shipments.

Union Carbide Corp. yesterday reported 1980 net income of $13.36 a share, including $3.28 from a change in accounting for the investment tax credit compared with $10.23 a share in 1979.

Actual net, including the nonrecurring income, was $889.8 million, up from $671.1 million. Sales rose to $9.99 billion from $9.18 billion.

Fourth-quarter profits were $160.4 million ($2.21 a share), including a 40-cent-a-share gain on divestiture of part of the company's metal business compared with $2.43 a share on a similar basis a year ago. Sales for the quarter were up 11 percent to $2.67 billion from $2.4 billion.

Nabisco Inc. yesterday reported record earnings of $127.8 million last year, up from $99.8 million in 1979, and credited its U.S. and international food operations for the 28.1 percent gain.

Sales, led by biscuits, crackers, cookies and snack foods, reached $2.57 billion in 1980, a 9 percent increase from $2.36 billion the previous year. Per-share income climbed to $3.96 from $3.10 in 1979, when there was a nonrecurring charge of 28 cents a share from the sale of a West German subsidiary.

For the fourth quarter, Nabisco earned $42.2 million ($1.31 a share), up 19 percent from $35.4 million ($1.10) in the final quarter of 1979, the company said. Sales increased 12 percent to $719.4 million from $643.2 million in the same period of 1979.