In the city’s funny math, you get only one teacher for the price of two.

The Department of Education pays about 1,500 teachers for time they spend on union activities — and pays other teachers to replace them in the classroom.

It’s a sweetheart deal that costs taxpayers an extra $9 million a year to pay fill-ins for instructors who are sprung — at full pay — to carry out responsibilities for the United Federation of Teachers.

With Mayor Bloomberg calling for thousands of teacher layoffs to balance the 2012 budget, critics say it’s time to halt the extravagant benefit.

“In these tight fiscal times, it defies common sense to pay two different people to do one job,” said Dick Dadey, executive director of Citizens Union, a government watchdog. “It’s a waste of money.”

That $9 million would cover the salaries of 198 new teachers at the current annual $45,530 starting pay

The DOE lets 40 experienced teachers collect top pay and fringe benefits, but work just one class period a day.

Under a longstanding contract agreement, the DOE excuses these veterans to work for the UFT — currently 38 as district representatives and two as union vice presidents. The UFT pays them another salary, plus expenses.

English teacher Tom Dromgoole, for instance, collects top teacher pay, $100,049 a year, from the DOE for his slot at Leadership and Public Service HS in downtown Manhattan. But he is relieved for most of the day to serve as a UFT high school rep. The UFT supplements his salary by $50,461, records show.

Dromgoole is outspoken on state budget cuts, which he blasted at a boisterous protest last March with UFT President Michael Mulgrew. Reached Friday outside his Brooklyn townhouse, Dromgoole brushed past a reporter who asked about his UFT work, saying, “No comment.”

Another veteran teacher said of the lucrative gigs, “It’s a plum because you’re not teaching. Some principals give them little or nothing to do” because the UFT reps are powerful.

The rest of the 1,500 teachers paid for time away from students are UFT “chapter leaders,” who represent faculty at each school. They get at least four or five class periods a week “for investigation of grievances” and other union-related duties, the contract says.

The UFT reimburses the DOE only about $900,000 of nearly $10 million it spends to replace the teachers, officials said.

One principal said his school’s chapter leader is helpful as a staff liaison, but he questioned why the UFT — which collects $126 million in member dues — doesn’t cover the cost: “They have a lot of money to run TV ads. Should DOE be paying for this?”

UFT spokesman Dick Riley said such arrangements are common among city unions “and were instituted with the agreement of NYC government.”