Everything seems to be run by algorithms these days, and setting prices is no exception. So-called pricing algorithms are already widespread online, and studies have revealed that these systems alienate customers while really only making things more expensive.

Pricing algorithms change prices in real time using a variety of inputs, including things like the time of day, the weather, and the number of customers interested in a product. Because different algorithms use different inputs, Harvard economics professor Alexander McKay says that the prices they set can also vary.

McKay co-authored paper on the effects of pricing algorithms published in National Bureau of Economic Research.

While these algorithms should theoretically allow customers to access lower prices thanks to undercutting by competing sellers, McKay says it doesn't work that way in practice. Businesses don't want to risk a spiralling series of price cuts.

"Why try to start a price war against a firm whose algorithm will see my price change and immediately undercut it," McKay said. "Firms are trying to maximize profits and they're trying to do it in a way that's legal and competitive."

"It's sort of in your best interest to adopt an algorithm to be able to consistently undercut your rivals to maintain a market share advantage," he continued.

However, the impacts of pricing algorithms are more complex than just a couple of extra dollars at checkout.

One common example of the darkside of pricing algorithms is Uber's (UBER  ) algorithm's response to the 2017 London Bridge terror attack. During the attack, demand shot up in the area, and the algorithm started ratcheting up prices. In that case, Uber stepped in to manually halt the price increases, and later refunded users.

Price fluctuations caused by pricing algorithms can also make customers feel betrayed by sellers. According to a study published in Frontiers in Psychology, price changes decreased customers' perception of being treated fairly, and led to "disastrous consequences both for the vulnerable party and for the performance of the business relationship as a whole."

"In the worst case, algorithms turn the already delicate task of asking customers for money into an experience that drives them away," wrote Marco Bertini and Oded Koenigsberg in an article on the risks of pricing algorithms for the Harvard Business Review.

While prices for products used to be similar across brands for longer periods of time, now, Bertini and Oded write that algorithms have changed that relationship.

"Technology has made the clashes more frequent, more arbitrary-seeming, and more starling in size-which unsettles customers and makes it harder than ever for them to reconcile what they see with what they expect," Bertini and Koenigsberg wrote.

However, Bertini and Koenigsberg add that many businesses see steady prices as a sign that they're missing out on potential profits.

Pricing algorithms are becoming ubiquitous, but that also means that customers are growing more aware of them. As that happens, they become more and more dissatisfied.

"By emphasizing only supply-and-demand fluctuations in real time, the algorithm runs counter to marketing teams' aims for longer-term relationships and loyalty," Bertini and Oded wrote.

According to McKay, only a few regulations would need to be established to stop the rapid price fluctuations. He says the key would be stopping algorithms from using their competitors' prices as a factor. After that, McKay says restrictions should be added on how frequently businesses can change their prices.