The Maryland Public Service Commission has ordered a change in the way the Potomac Electric Power Co. computes its fuel adjustment charges that will result in average refund of $4 to its customers in the state, a company spokesman said yesterday.

The commission also found that the electric utility "has followed competitive fuel procurement practices and has effective ongoing programs to minimize fuel costs" in all but one of its generating plants.

At the same time, the commission, which regulates utilities in Maryland, found that Baltimore Gas and Electric Co. with 800,000 customers in the Baltimore area pays "excessive prices" for coal. It will determine later what refunds must be made to customers because of this.

Pepco has 276,000 customers in Maryland and 186,000 in the District of Columbia.

The ruling, issued Wednesday, was the result of the commission's first examination of electric utility fuel adjustment practices under stringent new state legislation that restricts the ability of utilities to automatically pass on fuel costs to their customers.

"Maryland citizens will get some money back and the legislature has won its battle to strongly control fuel rates in the state," said Gary Alexander, special counsel for the state People's Counsel Office, which represents consumers in utility cases.

There was testimony during hearings in September and October that the Baltimore Gas and Electric paid the highest prices for coal of any utility in the country during 1977.

Pepco received the commission's praises for its fuel procurement practices except in the case of fuel for a Pennsylvania generating plant that the company owns jointly with other Maryland power companies.

"It appears that Pepco does not give the same attention to fuel costs" there as it does to costs at "plants of which it is sole owner," the commission order said.

The state legislature passed the new fuel adjustment law earlier this year in order to level out what had been greatly fluctuating monthly fuel charges to customers, and to require a closer official scrutiny of company practices.