The Supreme Court ruled 7 to 2 yesterday that cash allowances paid to state troopers in lieu of meals - a practice in 15 states - are part of their gross income and subject to federal taxation.

In the opinion for the court, Justice William J. Brennan Jr. recognized that the decision may generate claims of unfairness, particularly because members of the Armed Forces still may exclude their subsistence allowances from taxation.

"While this may be so, arguments of equity have little force in construing the boundaries of exclusions and deductions from income, many of which, to be administratable, must be arbitrary," Brennan said. In any event, he added. Congress "considered and rejected" this equity argument in 1954 when it revised the Internal Revenue Code.

In the dissenting opinion, Justice Harry A. Blackmun, joined by Chief Justice Warren E. Burger, termed "ironical" the difference in past treatment the majority "now accords to the paramilitary . . . state trooper structure and the federal military." Blackmun wrote that the majority's arguments for denying to troopers a benefit given to the military are "thin and weak . . . I fear that state troopers the country over, not handsomely paid to begin with, will never understand today's decision."

The case involved Robert J. Kowalski, a New Jersey state policeman. In 1970, the tax year in dispute, his base pay was $8,739. He got an additional $1,698 in lieu of meals. The allowance was not reimbursement: it was paid in advance and it was his to spend, or not spend, as he wished.

New Jersey is one of the state - Maryland and Virginia not among them - that adopted the allowance plan because it enabled them to keep troopers on call during mealtimes. Previously, New Jersey had official meal stations; but to go to them the troopers had to leave their assigned patrol areas. The state-provided meals were not "income," the Internal Revenue Service said.

The 15 states pay about $10 million annually in meal allowances to about 10,000 troopers, the IRS estimates. The IRS says it has nearly 2,200 meal-allowance disputes with state troopers. The disputed taxes total 4.5 million.

An IRS spokesman told a reporter that yesterday's decision is "separate and apart" from the agency's ongoing review of fringe benefits for executives.

In a one-sentence ruling involving the Age Discrimination and Employment Act, the justices divided 4 to 4 on the issue of whether a person claiming a violation must file a notice of intent to sue the employer within 180 days after the alleged discriminatory act.

The effect of the ruling is to affirm a decision by the Tenth U.S. Circuit Court of Appeals for Anne M. Dartt, who sued Shell Oil Co. 216 days after she was dismissed in 1973, when she was 51. Because of the even split among the justices, the ruling sets no president. The justice who did not participate, for unannounced reasons, was Potter Stewart.