Dynamic pricing with Machine Learning

Determining the optimal price for a good or service is as old as the craft of trade itself. Through the years, economists developed a vast amount of pricing strategies depending on the objective. One retailer may want to maximise profitability, while another company targets an increase in market share. The complexity of the strategy increases when pricing becomes more dynamic, which means that the price is constantly updated depending on the market conditions and the customer properties/preferences. We all know that booking the same seat on an aeroplane can come with fast-changing offerings. In B2B sales, rapid negotiations for bulk raw materials purchases are standard practices.

With the ongoing boom in the growth of online (re)sellers, making sure that changing prices of goods and services are fast and dynamic has never been more crucial than in current times. The competitive landscape is getting increasingly complex, and your business pricing model needs to be ready to adapt to fast changes in customer demand and purchasing behaviours. Making quick, informed actions around pricing has a massive impact on overall profit margins and competitiveness. Even if you do not aim to be the cheapest, intelligent models that provide you with a more objective opinion on what a price should be can be of great value.

In this article, we will explain why Machine Learning technology takes price optimisation to the next level.

What is price optimisation?

Price optimisation’s primary goal is to understand how customers and competitors react to different pricing strategies and pick the optimal choice. Price optimisation techniques can help companies assess the potential impact of promotions or provide estimates of the right price for each unit if they want to sell it in a specific time window (e.g. in clearance sales).

Every business struggles with the question: what is a competitive price of a product or service? Also, they have to take the current state of the market and the competition into the equation. These days it is easy for customers to compare prices thanks to the internet. Businesses have to pay close attention to many parameters when setting prices. Competition, production costs, and distribution costs all play a role in determining the right price.

One of the many pricing strategies that exist is dynamic pricing. A term that is sometimes confused as a synonym of price optimisation. Dynamic pricing is part of the broader concept of price optimisation. For example, using an active pricing strategy, retailers can dynamically alter the prices of their products to match them with their competitors. 

Optimal price optimisation needs many data from various sources to suggest the best price or price range. That is why linking price optimisation with machine learning technology is the go-to option for many cases. 


Price optimisation uses AI to analyze a company’s sales data to determine the optimal price for each product or service. This can involve identifying the price points that result in the highest profit margins and considering factors such as production costs and competitors’ prices.

Dynamic pricing with Machine Learning

Machine Learning can be of great use in speeding up & enhancing the price optimisation process. Its true power is that the developed algorithms can learn patterns from data instead of being manually programmed. Machine Learning models can continuously process and integrate new information and detect emerging trends or new demands.

Instead of using a pre-defined set of rules such as:

  • Increase price of all products in the Y category by 10%
  • If X is 10 % higher than usual, decrease by 5%
  • Keep ‘X’ price cheaper than the competition

As you can tell, it has to be defined and constantly manually updated. Furthermore, a set of rules can quickly result in an incredible collection of (conflicting or stacking) rules. A machine learning model could take into account historical data and different characteristics of the product but also unstructured data such as images and text. It is crucial to underline here that there will always be a human component in deciding the correct prices. It will not replace but enhance the decision-making by adding a more objective layer in the global strategy.

The bottom line here is that your company will have a full view of what your competitors are doing and what your customers think at any given time and a better sense of the influences and reasons behind their buying behaviour.

You will be able to dynamically alter the prices of products based on the current market demand. And remember that changing the price with no objective function in mind will lead to sub-optimal results. That is why we suggest using dynamic pricing powered by machine learning.


With dynamic pricing, businesses can adjust prices in real time based on demand and other factors. For example, an e-commerce company might increase prices for popular products during peak demand periods or lower prices for less popular products to drive sales. AI algorithms can process real-time data to determine the optimal price for each product or service.


  • In what way is the sale of socks impacted when shoe prices are drastically cut?
  • When we try to sell more air fryers, are the related products, such as pizza, fries and other snacks, impacted?
  • Are our customers who buy a specific TV more or less likely to purchase soundbars the following week?
  • Are inactive clients sensitive to a Black Friday promotion this year?

These are the questions that we can help answer with this technology. 


  • Machine Learning can process a substantial number of products and optimise prices in all product categories. That is a near-impossible task (time and effort-wise) for retailers if they try to do it manually or on other software platforms. 
  • Changing the price of a product impacts the sales of other products in ways that are very hard to predict for a human
  • Analysts can modify KPIs, and the model will recalculate prices for the new goals.
  • Machine Learning can detect trends. The worst thing that can happen is not having enough stock and selling goods cheap when the demand for a product is soaring.
  • The model can continuously crawl the web and social media to gather valuable information about competitors’ prices for the same or similar products. But also do sentiment analysis, what customers say about products and competitors so that you can make more informed decisions about the price setting.

While it may seem more logical to apply Machine Learning in the case of e-commerce retailers, brick-and-mortar retailers can ideally take advantage of this technology.

You may think that price changes are less often performed in brick-and-mortar retailers because they have less room to improve and adjust to current demand. But that is not always the case; digital price tags enable brick-and-mortar retailers to do as many price changes as e-commerce sites. However, shop owners can perform weekly or monthly price changes to match the current demand and maximise profit even without digital price tags. Furthermore, B2B sales that are performed using negotiable bulk purchases can also benefit from dynamic pricing.

How would a typical scenario unfold?

Imagine DIY e-commerce or physical store that wants to estimate the best prices for new products for the summer. Potential products could be BBQ’s, solar screens, outdoor tables, garden tools,…

How exactly are we going to set up machine learning-based pricing?

Data collection and data cleansing

First, our data science team will need different types of data. The dataset might look like this:

Transactional data:

  • List of all SKU’s sold at different prices historically
  • Price history of all SKU’s
  • Product descriptions such as category, size and colour.

Other relevant cost data:

  • Marketing expenses/pushes
  • Promotions
  • Profit margin(s)

Inventory data:

  • Inventory levels
  • Product availability

Competitor data:

  • Competitor pricing

CRM data:

  • Customer reviews & feedback

The collected data must then be cleaned and prepared for further processing. This step is challenging because our data scientist must merge data of different formats from different sources. Nonetheless, the experience of our data scientists will ensure that the data transform correctly and entirely into an algorithm. Not all information needs to be available.

Machine learning training

Next, we are going to train the machine learning model. First, the model analyses all variables and decides the possible results of price changes on sales. While doing this, the machine learning model independently detects correlations and patterns that human analysts easily overlook. 

All this data is integrated into the algorithm so that we can calculate optimal prices. Now we have a sound basis for our forecasting model.

Once ready, the initial model undergoes a practical (AB) test and is further optimised by our data science team. With each correction, the algorithm improves.  You can add additional data sets to maximise the accuracy of the algorithm further. Over time, our team can decrease the (re)training effort while the model’s effectiveness continuously increases.

Optimisation based on price elasticity predictions

Once our team has finished the model, it can define the optimal prices aligned to specific business objectives and determine the optimal price for hundreds of products.

Marketing and product development teams can use these calculations to experiment with prices and discounts and better assess the potential impact on sales and demand. Instead of relying on instinct, your analysts can reason based on the machine learning algorithm results. That gives them room to manoeuvre, which usually translates into increased sales and profits.

What about unforeseen external circumstances such as the COVID pandemic?

A global crisis such as COVID has a direct impact on consumer spending. Most industries are impacted and see dwindling sales. That sparks the following question: are we still able to use Machine Learning to predict demand in this scenario? 

The answer is yes, but with a few crucial tweaks. As we have explained, Machine Learning models use historical sales and correlate external data such as competitor reactions to assess the optimal price. These COVID times heavily disrupts the market. Historical insights are likely to fall short in predicting future sales. However, corrections based on external information such as the total impact on the market can be integrated.

To cope with this situation, we’d need to increase the importance of shorter-term information such as daily sales. Because of the unpredictability of the market during a crisis, short-term information is much more suitable to predict the future than in calmer times.

Are you interested to know more? Contact our team to have a chat!

And You?


Receive news about AI.