How to Calculate Cumulative Percentages Below Thresholds in Excel
Question details
The user needs to calculate the percentage of daily energy values that fall below or equal to specific battery-capacity thresholds ranging from 0 to 60 kWh.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Analyzing daily energy datasets against multiple capacity thresholds to evaluate cumulative percentage distributions.
- Observed behavior
- Requires a formula to dynamically compare a range of spilled values against a predefined list of thresholds and return the calculated percentage for each bin.
Ensure your daily energy values are organized in a single column or dynamic array, and your capacity thresholds (e.g., 0 to 60) are listed in a separate column without blank rows.
Using COUNTIF and COUNT for Cumulative Percentages
This is the most direct method to calculate cumulative percentages by comparing a dynamic array of values against specific threshold limits.
While the FREQUENCY function can calculate counts for specific data bins, using the COUNTIF function divided by the COUNT function is much more straightforward when your goal is to calculate cumulative percentages below or equal to specific thresholds.
Locate your simulated values (e.g., starting at cell A2 as a dynamic array) and your threshold values (e.g., typed into cells I2:I8).
In the cell next to your first threshold (e.g., J2), type the formula: =COUNTIF(A2#,"<="&I2:I8)/COUNT(A2#). The 'A2#' syntax ensures the formula dynamically applies to the entire spilled array of your energy values.
Select the cells containing the formula results. Navigate to the Home tab and click the Percentage Style icon (%), or press Ctrl+Shift+% on your keyboard to display the decimal values as percentages.

Calculate Cumulative Percentages Effortlessly in WPS Spreadsheet
WPS Spreadsheet fully supports advanced statistical formulas and dynamic arrays, making it incredibly easy to calculate threshold percentages for your energy data without performance lags.
- 1. Open your data file: Launch WPS Spreadsheet and open the workbook containing your daily energy values and capacity thresholds.
- 2. Input the array formula: Select the target cell next to your thresholds and type =COUNTIF(A2#,"<="&I2:I8)/COUNT(A2#) to reference your data array.
- 3. Apply Percentage Formatting: Highlight the resulting decimal values, navigate to the Home tab, and select the Percentage format from the Number formatting dropdown to view the cumulative distributions clearly.

Frequently Asked Questions
Can I use the FREQUENCY function instead of COUNTIF?
Yes, the FREQUENCY function calculates how often values occur within a range of values (bins). However, it returns the count of items falling strictly into each individual bin. To get cumulative percentages, COUNTIF combined with a comparative operator is much more direct.
What does the '#' symbol mean in the formula A2#?
The '#' symbol denotes a spilled range reference in modern spreadsheet software. It automatically expands to include all values returned by a dynamic array formula starting in cell A2, ensuring your calculations always cover the full, expanding dataset.
Why is my formula returning a decimal instead of a percentage?
The formula calculates the mathematical ratio (e.g., 0.75). To display it as 75%, you need to apply the Percentage number format. You can do this by selecting the cells, going to the Home tab, and clicking the '%' icon.
How do I calculate percentages above the threshold instead?
To calculate the percentage of values strictly greater than the threshold, change the logical operator in your formula from "<=" to ">". For example, use: =COUNTIF(A2#,">"&I2:I8)/COUNT(A2#).




