How to Calculate the Percentage of Repeat Customers in Excel
Question details
The user needs to calculate the percentage of repeat customers (those who made multiple purchases) compared to the total number of unique customers in an Excel dataset.
- Product
- Excel
- Device & OS
- not provided
- Scenario
- Analyzing customer sales data to determine the customer retention rate or the exact percentage of customers who have purchased more than once.
- Observed behavior
- Requires a formula to identify and count customers with multiple entries in a dataset, and divide that count by the total number of unique customers to output a percentage result.
Ensure your sales dataset is organized into columns with clear customer identifiers (like names or IDs) and the products they purchased. Verify that your version of Excel supports modern dynamic array functions like UNIQUE and FILTER.
Using Basic Dynamic Array Functions (LET, UNIQUE, FILTER)
This is the most straightforward method to calculate the repeat customer percentage, assuming each customer-product row represents a distinct purchase.
This formula uses the LET function to define variables for your customer list and unique customers, making the calculation cleaner. It then filters out customers who appear two or more times and divides that count by the total unique customers.
Click on the blank cell where you want the final percentage to be displayed.
Type the formula =LET(cus,A2:A7,ucus,UNIQUE(A2:A7),COUNTA(FILTER(ucus,COUNTIF(cus,ucus)>=2))/COUNTA(ucus)), replacing A2:A7 with your actual customer data range.
Press Enter to calculate the ratio. Then, navigate to the Home tab and click the Percentage style button to display the decimal as a percentage.
Calculating Percentage Based on Distinct Products Purchased
Use this advanced LAMBDA formula if you only want to count customers as 'repeat' when they buy different, distinct products, ignoring multiple purchases of the exact same item.
Calculating Percentage Based on Total Items Purchased
Use this variation of the LAMBDA formula to count customers who bought more than one item in total, regardless of whether the items were distinct or identical.
Calculate Repeat Customer Percentages Easily in WPS Office
WPS Spreadsheet provides robust formula support and dynamic arrays, allowing you to seamlessly analyze customer retention data and calculate repeat purchase percentages just like you would in Microsoft Excel.
- 1. Open your dataset: Launch WPS Spreadsheet and open the file containing your customer sales data.
- 2. Select an output cell: Click on an empty cell where you wish to display the calculated retention percentage.
- 3. Input the calculation formula: Type your preferred formula (such as the COUNTIF and UNIQUE combination) tailored to the range of your customer data.
- 4. Format the result: Press Enter, then click the '%' icon on the Home tab to convert the decimal output into a readable percentage.

Frequently Asked Questions
Can I calculate repeat customers without using the LET function?
Yes, if your software version does not support LET, you can use a helper column to count occurrences with =COUNTIF(A:A, A2). You can then use a Pivot Table or standard COUNTIF formulas to find the percentage of customers with counts greater than 1.
Why is my formula returning a decimal instead of a percentage?
Formulas naturally output raw ratios (for example, 0.5 instead of 50%). To fix this, simply select the result cell and apply the Percentage number format from the Home tab or by pressing Ctrl+Shift+%.
How do I quickly count the total number of unique customers?
You can count unique customers by combining the COUNTA and UNIQUE functions. Entering the formula =COUNTA(UNIQUE(A2:A100)) will return the exact number of distinct customer names in that range.
Does the UNIQUE function work in older versions of Excel?
No, UNIQUE is a dynamic array function available only in Microsoft 365 and Excel 2021 or newer. For older versions, you will need to rely on Pivot Tables or complex array formulas combining INDEX and MATCH.




