What would it take to unseat New York City’s iconic yellow cab as the king of the street hail? Three thousand Ubers and a computer algorithm, according to a new study.

Although about 14,000 yellow cabs have licenses to roam the city, new research from the Massachusetts Institute of Technology suggests that the city’s transportation network could be supported with just a quarter of that — if passengers were willing to carpool through services such as Uber and Lyft.

In a six-month study, a team of researchers created an algorithm showing that 3,000 four-person cars could serve 98 percent of the city’s taxi demand, with wait times averaging only about 2.3 minutes. The algorithm, which draws from data from 3 million New York City taxi rides, “works in real-time to reroute cars based on incoming requests,” according to the researchers. It also sends idle cars to areas with high demand, speeding up service by 20 percent, the research team said.

Ride-hailing companies have their own algorithms for dispatching rides through their shared-ride systems, but the researchers said those mechanisms have limitations: for example, requiring that “user B” be along the same route as “user A” and — in some instances — requiring that all requests have poured in before a route is created.

The MIT algorithm is more complex and improves over time, the study’s authors said. And despite the study’s conclusions, they say, it’s not meant to harm the taxi industry. In a phone interview, professor Daniela Rus of MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL) said the findings simply show a city’s transportation infrastructure could support fewer cars on the road at any given time.

“We really see this as an opportunity to improve efficiency and improve the lives of drivers,” she said. “Instead of working 12-hour shifts, you could work six- or eight-hour shifts. And you would make the same amount of money because it’s the same transportation need, it’s the same level of payment that flows through the system.”

Researchers experimented with vehicles of various sizes. They found, for example, that 2,000 10-person vans could serve 98 percent of New York City’s taxi demand, with an average wait time of 2.8 minutes. The algorithm determines which size vehicle is best suited for the request.

“To our knowledge, this is the first time that scientists have been able to experimentally quantify the trade-off between fleet size, capacity, waiting time, travel delay, and operational costs for a range of vehicles, from taxis to vans and shuttles,” Rus said in a statement. “What’s more, the system is particularly suited to autonomous cars, since it can continuously reroute vehicles based on real-time requests.”

The conclusions suggest that ride-sharing could greatly reduce traffic congestion and environmental pollution, while improving quality of life for residents of big cities. Researchers said it was a watershed finding in the study of the fledgling ride-sharing industry.

“Fewer cars on roads means improved quality of life for everyone, it means better traffic, it means lower pollution, it’s a better transportation experience,” said Rus, who co-wrote the article with students and fellow academics, including Cornell University and MIT professors.

The Proceedings of the National Academy of the Sciences published the study, which was supported by the Singapore-MIT alliance for Research and Technology and the Office of Naval Research. Researchers said the conclusions come at a pivotal moment for ride-hailing.

Ride-sharing has the potential to upend modern transportation and greatly reduce the negative impact of traffic, which forces people to spend 5.5 billion hours a year sitting in their cars and costs the US economy an estimated $121 billion annually,” said a news release accompanying the study. “While the concept of carpooling has been around for decades, it’s only in the last two years that services like Uber and Lyft have leveraged smartphone data to optimize routes and make ride-sharing a cheap, convenient option for users.”

(Washington Post owner Jeffrey P. Bezos is an Uber investor.)