San Francisco officials have declared the recent test run of keeping the city’s Pit Stop public toilets open all night a success — and at about $28.50 per flush, it ought to be.

“This is not complicated. When people have access to a clean, safe restroom, they will use it,” Mayor London Breed said last week when she announced the city would continue to keep three Pit Stops used in the test open all night until July while officials consider expanding the program to other locations.

“We should open all of them downtown, in my district, 24 hours,” said Supervisor Matt Haney, whose Tenderloin neighborhood streets and sidewalks often double as toilets. “I know there is a need there.

“The other locations we should look at in a case-by-case basis and review the use data. I’m certain there are other parts of the city with similar needs,” Haney said.

Public Works has estimated that keeping all 24 of the city’s Pit Stops open around the clock would cost an extra $8.25 million a year. A funding source has not been identified.

Staffing is the primary cost. The attendants ensure the public bathrooms are kept safe, clean and used for their intended purpose. History has shown that without attendants, public toilets in some of San Francisco’s most challenging neighborhoods are used for drug activity and prostitution, and become targets of vandalism.

The three-month test set up all-night Pit Stops at three existing locations: Sixth and Jessie streets South of Market, Market and Castro streets in the Castro, and Eddy and Jones streets in the Tenderloin. People going to the bathroom on streets and sidewalks is a constant problem in all three areas.

Two-member teams staffed the toilets during the overnight hours. Just one attendant staffs them the rest of the time. It cost an extra $300,000 to keep the toilets open around the clock from mid-August through mid-November.

During that period, according to Public Works logs, the three toilets were used a total of 10,518 times between 11 p.m. and 7 a.m., when they would normally have been closed. So the extra $300,000 for 10,518 after-hour uses comes to $28.52 per overnight flush.

But given the odious state of the streets, City Hall says it was worth it — and then some.

“The Pit Stops provide a place for people to take care of their bathroom needs with dignity, improving neighborhood livability and reducing demands on Public Works staff to clean up human waste from the city’s sidewalks, doorways and streets,” said Public Works Director Mohammed Nuru, who started the program five years ago.

And while Nuru is correct that there was a reduction in demand for cleanups, that reduction doesn’t appear to be all that great.

In the quarter-mile radius around the Tenderloin Pit Stop, calls went from 188 in the three months prior to the test to 176 during the three-month test — that’s a drop of four calls per month.

Calls for cleanups in the quarter-mile radius around South of Market Pit Stop dropped to 166 from 190 — eight fewer per month. Calls in the quarter-mile around the Castro Pit Stop dropped from 68 to 61, less than three per month.

Public Works estimates that keeping all of the city’s 24 Pit Stops open around the clock would cost an additional $8.25 million, making the total annual cost of operating the facilities $13.25 million.

By comparison, this year’s steam-cleaning budget is $7.6 million.

For Haney, however, the all-night service is worth the cost.

That’s because the Pit Stops also provide needle disposal and bags for cleaning up dog waste.

And they create jobs.

“The people who do the work are almost entirely recently formerly incarcerated, so it also serves as a sort of jobs program,” Haney said. “So there are significant additional benefits other than only the bathroom uses.”

Nuru knows that all too well.

“Behavior makes a difference,” he said.

San Francisco Chronicle columnist Phil Matier appears Sundays and Wednesdays. Matier can be seen on the KGO-TV morning and evening news and can also be heard on KCBS radio Monday through Friday at 7:50 a.m. and 5:50 p.m. Got a tip? Call 415-777-8815, or email pmatier@sfchronicle.com. Twitter: @philmatier