A federal judge, ruling that operation of a major league franchise is a business and not a "rich man's toy," has given the Milwaukee Brewers a shutout victory in a long battle with the government over the club's tax status, and ordered the Internal Revenue Service to refund $151,608 to owner Allan H. (Bud) Selig.

Judge John W. Reynolds of Milwaukee ruled that Selig and his partners were justified in claiming that 94 percent of the $10.8 million they paid to acquire the club represented the value of the players' contracts, rather than the value of the franchise itself, and therefore could be depreciated for tax purposes.

Most of the value of any franchise is represented by the players, not by the franchise itself, the judge ruled, and therefore it was proper for the Brewers to claim that the great preponderance of the price of their franchise was represented by a depreciable asset, the players' contracts.

"The right to play baseball in Milwaukee is not worth much. Everyone agrees on that," the judge said.

Allocation of the relative values of the components of a franchise is crucial to the owners, because the greater the percentage allocated to player contracts, the greater the amount of depreciation that the owners can write off against their tax liabilities. Ownership of the franchise, which the government argued constitutes a higher proportion of the total value than the Brewers gave it, is not depreciable because it has no time limit to its value.

If upheld after an expected appeal by the Justice Department, his ruling could result in similar refunds to the owners of the New York Yankees, the former owner of the Chicago White Sox, and several others who acquired big league sports franchises before 1976. The Baltimore Orioles are not affected because owner Edward Bennett Williams bought the franchise in 1979.

In 1976, Congress rewrote the tax laws to create a "presumption" that no more than 50 percent of the purchase price of any franchise could be allocated for tax purposes to depreciable player contracts unless the owners can show otherwise. It is possible, lawyers familiar with the Milwaukee case said, that Judge Reynolds' ruling could be used in attacks on the presumption by owners who have acquired teams since the law was changed. "All that 1976 law did was establish a presumption that 50 percent is attributable to the value of a franchise. That presumption is rebuttable," said David Beckwith, the Milwaukee attorney who represented Selig in the tax case. "But you can't generalize too far. This case was based on specific facts."

In his opinion, Judge Reynolds examined virtually every aspect of the economics of owning a major league franchise, and he ruled against the IRS on every disputed point.

The IRS, he said, asked him to find that Selig and his partners deliberately structured their business to allow them to claim depreciation on their own tax returns and to "draw certain inferences and conclusions from this . . . I decline to do so for two reasons. First, even if this is true, it is not illegal. Second, the evidence does not support such a claim."

Selig and his partners created the Brewers by purchasing the assets of the defunct Seattle Pilots in 1970. The IRS argued that even if the allocation formula used by Selig and his partners was valid, the overall value they set on the players' contracts was far too high.

Using evaluations by Dewey Soriano, former president of the Pilots, and by Dick Walsh, former general manager of the California Angels, the government tried to show that the player contracts acquired by the Brewers were worth between $3.2 and $5.1 million. But the judge rejected those assessements, which he said were made recently and only from memory, in favor of evaluations made at the time by promiment baseball executives, putting the value at more than $10 million.

He also rejected the government's argument that the true cost of developing a major league player is about $30,000, calculated by dividing a team's player development costs by all the players in its system, major league and minor.

The Justice Department has until mid-July to file an appeal. An appeal creates the risk that Reynolds' ruling would be upheld by higher courts and thus made applicable to all other pending cases.