What's cheaper in your city: Cabs or ride shares?

Taxis come down Second Avenue in New York.
Timothy A. Clary | AFP | Getty Images
Taxis come down Second Avenue in New York.

The cost of taking a cab home from a bar late at night depends a lot on where you live.

With the new ride-hailing options available today, the answer is seldom a taxi. Looking at the city-by-city fare formulas published by Uber, Lyft and Sidecar, Uber is the best option in 16 out of 20 major cities, according to an analysis by GOBankingRates.

"People assume that Lyft or Sidecar are cheaper because they're newer," said Casey Bond, editor in chief of GOBankingRates. "In some cases they are, but Uber comes out on top in a lot of cities."

The Big Crunch also took a look at traditional taxi prices in each city—if tip is included, taxis in these cities tend to be more expensive than ride-hailing options, except on nights when each service is boosting costs with fare multipliers or surge pricing. During those periods, the cost of some ride-hailing services can jump by eight times, and the high but controlled cost of a traditional taxi can become the best deal.

"It really varies based on the city they're serving," said Bond. "New York is ridiculously more expensive than Los Angeles, even though they're both very large cities."

Uber and Lyft use identical fare formulas in New York, so they tie as the cheapest option for a 20-minute, 10-mile ride. In New York, that would cost you $32.50, about 56 percent more than the same trip in the second most expensive city, Seattle. That's more than twice the cost of the cheapest cities—Jacksonville, Florida, and Dallas.

The Big Crunch compared those rates to either fare formulas published by taxi authorities or average costs published by TaxiFareFinder.com. We also included a somewhat stingy tip of 15 percent. It's not customary to tip ride-hailing cabs, and that additional cost often pushes taxis fare above their more competitive app-based counterparts.

"I think there is a very clear mission among all these services to be more competitive than taxis," said Bond. "That's why most people use them, aside from the convenience of being able to order them on an app.

Running the numbers

Customers looking for the best deal should be conscious of the various factors that go into pricing their ride. The big ride-hailing companies use formulas that calculate the cost per mile and per minute, adding that sum to a base fare and any other fees. Those four factors each vary significantly by city—for example, in Los Angeles UberX charges no base fare at all. Taxi meters tend to charge by the mile while moving and by the minute when stopped at a light or in traffic.

The end result is that even if there is no surge pricing, the total cost differs based on the path taken to a destination or the amount of traffic. In New York, taxis tend to have higher per-minute rates, so for every "wasted" minute sitting in traffic, the cost spread between the taxi and an Uber or Lyft will increase. If you go straight to your destination 10 miles away, it will cost about 60 cents more in a taxi—not a huge difference—but if you sit in traffic for 30 minutes you'll be paying almost $6 more.

Read MoreUber valued at nearly $51B after funding: Report

In the same way, the difference between the per-mile and per-minute rates changes how much a ride share will cost. GOBankingRates also took a look at the same trips in each city during rush hour, assuming that surge pricing would not be applied but that it would take a full hour to go the same 10 miles.

In one city—Nashville, Tennessee, Lyft is a better deal than Uber during rush hour when it was a worse deal during normal hours. In general, however, Lyft and Sidecar tend to be even more expensive during rush hour, increasing an average of $8 or $9 for Uber's $7 additional cost. But that calculation could also change if you know that you're going to be taking a highway for most of the trip—which could increase the distance traveled but decrease the time.

Read MoreWhat it's like to be a Lyft driver

While the gap between providers may seem small, it can certainly add up over many trips, and ride-hailing customers tend to remain loyal to the app they use, said Bond.

"I think it's important to be aware of how the local pricing works in your city, because that has a significant impact on how much you're going to pay," said Bond. "People who tend to use ride shares use them a lot, and are often familiar with how they work and the nuances for their city."