After a 23 day strike, Washington teachers returned to their classrooms yesterday with a major but costly victory - extension of their stron union contract but with an average loss of almost $1.600 apiece in salary.

"The strike is over. The battle is won," teachers union president William H. Simons said after members voted heavily to go back to work at an early morning meeting in McKinley High School.

By 10 a.m., Superintendent Vincent Reed said, about 90 percent of the city's more than 6,000 teachers had reported for work. Reed said about half of the city's 113,000 students attended classes yesterday.

The strike came to an end just a day after D.C. Superior Court Judge Gladys Kessler met a key union demand and reinstated until July 15 the union's old contract with the school board while efforts continue to reach a new agreement.

School board members, who had precipitated the strike by refusing to extend the contract for a fourth time in mid-February, reacted glumly to the court order and cautiously to the teachers' return to work. The board postponed until today a meeting on whether to appeal Kessler's ruling.

"It was an enormous victory for the teachers union," said board vice president Carol Schwartz, "and the students are losing again."

Board President Minnie S. Woodson strongly criticized Mayor Marion Barry, whose court motion for a six-month extenstion of the contracct provided the impetus for Kesler's ruling.

"He [Barry] is still sticking his head in and intervening," Woodson said. "It gives me a feeling of apprehension, of puzzlement, a feeling of disgust almost."

The mayor declined to discuss the end of the strike when asked about it at a press conference. On Wednesday he issued a statement praising Kessler's order and calling on both sides to comply

Last night, Barry was applauded and hugged repeatedly when he visited a union-sponsored party at the Washington Hilton Hotel where about 1,500 persons were celebrating the end of the walkout.

Barry said he was just making a "courtesy call" and had been at the hotel for a separate meeting of the Washington chapter of the National Urban League. Union president Simons said the party was held "just to give people a chance to unwind in a different atmosphere."

Inside the schools yesterday, students interviewed said they were happy their regular teachers had returned, and were glad to be back themselves.

"I was just sitting at home, not doing anything," said Shawn Hall, 15, a 10th grader at McKinley High "Iths good to be back."

Reed said he would carry out all terms of the reinstated contract and welcomed the teachers who returned.

"I hope we will be able to band together for the rest of the school year," Reed said. "Of course, what we were doing before the strike now is a shambles, but we must make an effort to recover."

Reed said that even though all schools were kept open throughout the strike, about half of the city's teachers had stayed out.

The school system finance office estimated that strikers earning the average teacher's salary for the school system - $20,695 a year - had lost $1,587 each, if they stayed on strike for the full 23 days.

During negotiations the union had asked that all teacers who lost pay because of the strike be allowed to make up the time by working additional days in late spring.

But yesterday Simons said the union would not press this demand now. He said the union would try to establish a voluntary tutoring program, staffed by union members, to provide extra help for students after school and on Saturdays.

Reed said the school board planned to pay teachers who do extra afternoon and Saturday work. He said he also hoped to arrange for extra tutoring during regular school hours to teach material that students lost because of the Strike.

Special "reinforcement" programs, Reed said, should be operating late next week.

For the first time in three years Reed said there would be summer school for both remedial and advanced work. But Reed repeated a statement he first made last week that the regular school term would not be extended beyond its scheduled last day of June 15.

A longer school year, Reed said, probably would not improve quality. In addition, he said that many junior and senior high students have summer jobs.

Many of the returning schools noted that the strike had centered on non-monetary issues, such as working conditions and union power, because the school board does not set salaries.

"We felt pride that a group of black (teachers) could stand together for conviction," said Vernon Williams, a teacher at Hine Junior High School on Capitol Hill. "Carol Schwartz said time was on their side, that our pocketbooks would get us back . . . We know now . . . that progress is only made wit sacrifice."

Several teachers said they had anticipated the strike and filed their income tax forms early. They received tax refunds, they said, during the strike.

In addition, on March 16, the one payday during the strike, all teachers received their regular checks for work done during the last half of February. Under the city government pay system employes are paid two weeks after they earn their money.

The first time anyone will receive reduced pay because of the strike will be on Monday, when paychecks cover work performed during the first half of March.

School officials suggested that the two-week lag between the time when money is earned and checks are issued may have helped maintain the strike because it delayed any direct financial impact on strikers.

The teachers union does not pay strike benefits, but is offering to pay the interest on special credit union loans, starting next week.

Yesterday's union meeting, which started at 7:30 a.m., drew about 2,500 teachers. The session was closed to reporters, but Simons said afterward that 85 to 90 percent of those attending voted in favor of an executive committee recommendation for an immediate return to work.

Under Kessler's new order, all unresolved issues in the contract negotiations must be turned over to a fact finding panel. The panel will be composed of three members, one each selected by the board and the union and a neutral chairman. Kessler said the panel must make recommendations, which are not binding, by June 15.

Yesterday Herbert O. Reid, Mayor Barry's legal counsel. asked Kessler to delay to least until Monday collecting any of the fines she imposed on the union and its leaders for violating her order of March 12. Reid said he made the request because the mayor felt collecting the fines quickly might deter some teachers from returning to work.