What is the formula for calculating CLV?

The formula for calculating customer lifetime value is:
The simple CLV formula (which works well if your annual sales are relatively flat) is:
(Annual revenue per customer * Customer relationship in years) – Customer acquisition cost

The traditional CLV formula (which you should use if your sales are not flat) is:
Gross margin * (Retention rate / [1+ Rate of discount – Retention rate]