Online shopping

How pricing algorithms work in online shopping and could mean you pay more : NPR


You know, when you’re trying to buy something online, you can put an item in your cart and then continue browsing. And maybe you decide if you really want it or just want to shop around a bit more. But sometimes when you go back to your cart, the price is suddenly higher. The reason could be the pricing algorithms that many online retailers use to adjust their prices without another human entering a single keystroke. Our co-host Steve Inskeep asked Harvard economics professor Alexander MacKay what’s going on and what it all means for consumers.

ALEXANDER MACKAY: A pricing algorithm is simply a set of step-by-step instructions. And these instructions can be very simple or very complicated depending on the algorithm that a company chooses to do. But a key part of the algorithm is that given different inputs – like, for example, the time of day or the weather or the number of customers – it can decide on a different price. And one of the things that is particularly interesting and researched by us is that a lot of companies use algorithms that depend on the price of their competitors.


I guess some people are very familiar with this if they travel very often because they know that airplane seat prices are constantly changing. They can change in five minutes. Is this the kind of thing we’re talking about?

MACKAY: Yeah, that’s exactly it. Airlines have therefore long used pricing systems that allow variable pricing over time. One thing that has kind of changed in the last few years is that a lot more retailers have adopted high-frequency pricing algorithms, you know, especially in online marketplaces. So one thing that I think a lot of people expected with the rise of online marketplaces was that there would be very intense price competition, and you would kind of see the same prices on every website different, partly because it’s quite easy to shop at online retailers – isn’t it? – a few clicks to switch from one site to another.

But in fact, that didn’t actually happen. There are big price differences between websites, which is quite surprising. In fact, I just checked this morning. You know, I’m looking at a 15-pill pack of Allegra, which is a common allergy medication. And on Amazon, it shows me a price of 12.99; at Target, it shows me a price of 15.69; and at Walgreens it shows me a price of 17.99. We are considering a price difference of $5 for the exact same product.

INSKEEP: What’s going on? Do they all run their own algorithm?

MACKAY: Yeah. Some retailers have a lot more high frequency pricing algorithms that allow them to update their prices, you know, say, every 15 minutes. The other thing we noticed is that the companies with the fastest pricing algorithms always have lower prices than their rivals. The question is, is this a good thing? When you really look at the economics, you see that in fact it can discourage price competition between retailers. But if you have some kind of slower technology and you know that one of those faster companies is always going to undercut any price change you make, that sort of eliminates price competition. So why try to start a price war against a company whose algorithm will see my price change and immediately undercut it within potentially 15 minutes? I don’t really have the opportunity to gain market share.

INSKEEP: Although I suppose that indicates another reality regarding these algorithms. They are not necessarily put in place for the benefit of customers. They are put in place in the best interest of the person paying for the algorithm.

MACKAY: Absolutely. Absolutely. So companies are trying to maximize their profits, and they’re trying to do that in a way that’s, you know, legal and competitive. If you are a business trying to decide, should I adopt this algorithm or not? – it is somehow in your interest to adopt an algorithm to be able to systematically undercut your rivals, to maintain a market share advantage, but also to have this side effect of discouraging them from competing with you on price.

INKEEP: Wait a minute. So I’m going to offer the lowest price, but I’m not going to race to the bottom because no one else is going to try to go below me.

MACKAY: That’s exactly it. So even though relatively it looks like the fastest company has the best price and is competitive, because I eliminated price competition, my price may even be higher than it would have been otherwise.

INSKEEP: It sounds like another way the internet feels free, but it’s not free to the consumer at all.

MACKAY: I think it’s definitely counterintuitive, and it has certain characteristics that are very much like intense competition. But absolutely, when you get into it a bit, it seems to have these kind of surprising effects.

INSKEEP: What would you do about it as a government issue, a political issue or as an ordinary consumer?

MACKAY: So one of the characteristics of these algorithms is that they react to price changes from competitors. So if regulators are able to somehow limit or prevent companies from directly incorporating their competitors’ prices into the algorithms, that could be a way to somehow eliminate the threat of undercutting their prices and to lower prices in all areas. So, again, a big reason companies might be discouraged from lowering prices is that your competing company is going to react quickly with another price drop. But if, say, we regulated companies to only change prices once a week or once a day, you know, in some markets, that would prevent a company from threatening to quickly undermine price changes by its competitors.

INSKEEP: I wonder if these algorithms have been significant enough in their effects to be an inflationary factor. You are in that market which should drive prices down, but instead they somehow drift up or stay put.

MACKAY: The algorithms could absolutely have an effect on inflation. They are able to react more quickly to changes in various market factors, both in terms of demand – what consumers want – and in terms of supply, in terms of the cost of inputs. Some traditional pricing practices are sort of where manufacturers decide once a year what their prices will be. And in those contexts, you kind of have to anticipate what’s going to happen over the course of the year. And you may not be able to react quickly to the supply chain disruptions we have seen. And so I think under traditional pricing we certainly could have seen slower price increases than what we see today with pricing technology that can really take into account changes in the market in a lot of ways faster.

INSKEEP: Alexander MacKay is a professor of economics at Harvard. Thanks a lot.

MACKAY: Thank you very much.


Copyright © 2022 NRP. All rights reserved. Visit the Terms of Use and Permissions pages of our website at for more information.

NPR transcripts are created in peak time by an NPR contractor. This text may not be in its final form and may be updated or revised in the future. Accuracy and availability may vary. The authoritative recording of NPR’s programming is the audio recording.