Who will be your top spender next year? Find it out with the CLV


In this tutorial you will learn how to collect information about customer lifetimes, to answer questions such as “How many customers will be active next year and how much will they spend?” “Which customers will keep on providing value to the company and who is at risk of dropping out?”

As a result, your company can effectively plan targeted marketing communication activities, based on predictions of your customers’ future behavior.

About the CLV algorithm

Customer Lifetime Value (CLV) is a model that can, for example, predict profits according to your relationships with customers, using their purchase behavior as a starting point.

Our CLV implementation focuses on a model that can predict future customer purchases. As a result, you can create strategies based on known information and what is predicted to happen in the future. For example, you can identify the customers who are at risk of dropping out, as well as forecast what might be the future purchase levels during a defined period.

Only transactional details are considered, so the algorithm just needs a small amount of data to calculate the results:

  • customer_id
  • order_id
  • date
  • total_amount

The model takes the purchase regularity and frequency into account, and supposes that, after every purchase, an inactivity period will follow. Variables such as recency (the last purchase date) and the calibration time (how long the details of a customer have been recorded) are also considered.


In more detail, the Inter-Transaction-Time (the period between one purchase and another) for every customer follows an Erlang distribution, with a k parameter and lambda as the purchase rate. The purchase rate for all customers follows a Gamma distribution.

After every purchase, a customer becomes inactive with a probability of p, for which a Gamma distribution for all customers is presumed.

The model assumptions also include five parameters to maximize the likelihood function.

One advantage of this algorithm is that it takes the frequency paradox into account in a natural way. This means that if a customer has bought recently and with a high frequency, an inactivity period is expected.

The output for each customer is:

  • Future predicted purchase amount.
  • Drop out probability up to now.
  • Predicted cluster.
    The cluster the customer might belong to (Gold, Gold-Silver, Silver, Silver-Bronze, Bronze, Low-Spender) based on the predicted future purchase level (for example, in one year).
  • Actual cluster.
    The cluster the customer belongs to now (Gold, Gold-Silver, Silver, Silver-Bronze, Bronze, Low-Spender) based on the recent purchase level (for example, in one year).

The model is tested against historical data, using a time frame that equals the one you want to use for a prediction of the future. For example, if you want to predict behavior during the next year, the model should first be able to predict the drop outs and customer purchases during the previous year. Once we are confident about the results, the model parameters are fixed.

When a precise customer transaction regularity is recorded, the model accuracy may increase.

Whatever the case, a Contactlab data scientist will define the model parameters for every individual situation and determine the time frame that should be used for the prediction.


The following shows how the CLV algorithm works and demonstrates its usefulness to your company.

Take, for example, a customer who purchased 10 times in total. The first purchase was a year ago, while the last one was three months ago.


The model adapts itself to the available data distribution, together with the purchase frequency and regularity. It can therefore predict for the customer in the example (who has a high purchase frequency, if they are compared with the rest of the population) a drop out probability of 0.8 and a low expected future purchase value, despite the recent high spending level.

The output will be:

  • Predicted purchases: €5.
  • Drop out probability: 85%.
  • Predicted Cluster: Low-Spender.
  • Actual Cluster: Silver.

Once the customers have been identified and their behavior predicted, you can continue with the appropriate targeted marketing and engagement activities. You might, for example, plan differentiated communications for customers who are expected to maintain high spending levels during the relevant period and those who are projected to spend less. You could also highlight any predicted cluster changes and tailor communications according to the expected fluctuations.

The algorithm output can also be used for further analysis, such as detecting common patterns for high value customers with a raised drop out level prediction, or identifying possible correlations between status changes and the products purchased.

For more information about Data algorithm read the apposite guide section or contact our Customer Care.



  • P. Fader, B. Hardie, K. Lee (2005) “Counting Your Customers” the Easy Way: An Alternative to the Pareto/NBD Model. Marketing Science 24(2):275-284
  • Michael Platzer, Thomas Reutterer (2016) Ticking Away the Moments: Timing Regularity Helps to Better Predict Customer Activity. Marketing Science 35(5):779-799
  • https://cran.r-project.org/web/packages/BTYD/vignettes/BTYD-walkthrough.pdf
  • https://cran.r-project.org/web/packages/BTYDplus/vignettes/BTYDplus-HowTo.pdf