In a sense, all business boils down to math. But some companies have tougher equations to solve than others.

At UPS, the average driver makes about 120 deliveries per day, says Jack Levis, the shipping giant’s director of process management. To figure out how many different possible routes that driver could travel, just start multiplying: 120 * 119 * 118 * . . . * 3 * 2 * 1. The end result, Levis likes to say, far exceeds the age of the Earth in nanoseconds.

If that number sounds big, imagine having to make those calculations for 55,000 drivers every day. Until recently, UPS used a software tool that gave drivers a general route to follow but allowed wide latitude for human judgement along the way. Over the next five years, however, the company will roll out widely a more exacting algorithm designed to steer drivers away from well-worn paths toward often counterintuitive routes calculated to make delivery faster.