Fix Excel PEARSON Function Returning Unexpected Results
Question details
The user is getting incorrect correlation values when using the PEARSON function due to decimal and list separator conflicts.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating the Pearson product-moment correlation coefficient on a dataset containing decimal numbers.
- Observed behavior
- The PEARSON function returns unexpected mathematical results or fails to calculate correctly because Excel interprets decimal commas or periods differently based on system regional settings.
Ensure that the two data ranges you are comparing do not contain text values or empty cells, and verify that both arrays have the exact same number of data points.
Match Decimal and List Separators to Your Locale Settings
Check your Windows and Excel regional settings to ensure the correct symbols are used for decimals and list separation, preventing formula calculation errors.
In many European locales, a comma is used as a decimal separator, while a semicolon acts as a list separator. In the US and other regions, a period is the decimal separator, and a comma separates items in a list. Mixing these up causes Excel to interpret decimals as separate function arguments.
Look at the numbers in your spreadsheet. If your Excel locale expects periods (e.g., 1.25) as decimal separators, ensure you have not typed commas (e.g., 1,25).
Open the Windows Control Panel, go to 'Clock and Region', and select 'Change date, time, or number formats'. Click 'Additional settings' to see what your system expects for 'Decimal symbol' and 'List separator'.
Use the 'Find and Replace' feature (Ctrl + H) in Excel to swap commas for periods (or vice versa) in your data range, matching your system's required format.
Click on the cell containing your formula. Ensure the two data arrays are separated by the correct list separator for your locale (e.g., =PEARSON(A2:A10, B2:B10) or =PEARSON(A2:A10; B2:B10)).
Use WPS Spreadsheet for Seamless Statistical Analysis
WPS Spreadsheet offers powerful and intuitive statistical calculations. You can easily manage locale formats, and it accurately processes complex functions like PEARSON without compatibility issues.
- 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open your workbook containing the data arrays you want to analyze.
- 2. Start the correlation function: Select an empty cell where you want the result to appear and type =PEARSON( to begin the formula.
- 3. Select the first data array: Highlight the first range of numbers (e.g., your independent variables) and type your designated list separator.
- 4. Select the second data array: Highlight the second range of numbers (e.g., your dependent variables), ensuring it has the exact same number of cells as the first array.
- 5. Execute the calculation: Close the parenthesis with ) and press Enter to instantly calculate the accurate Pearson correlation coefficient.

Frequently Asked Questions
What does the PEARSON function actually calculate?
The PEARSON function calculates the Pearson product-moment correlation coefficient (r), a statistical measurement indicating the strength and direction of the linear relationship between two datasets.
Why is the PEARSON function returning an #N/A error?
This error occurs when the two ranges of data (Array1 and Array2) provided in the formula do not have an equal number of data points. Ensure both ranges are exactly the same size.
Why does PEARSON return a #DIV/0! error?
A #DIV/0! error happens if one or both of your selected data arrays are entirely empty, or if the standard deviation of the values in one of the arrays is equal to zero (all values in the array are identical).
Does the PEARSON function ignore text cells?
Yes, if the arrays you select contain empty cells, text, or logical values (TRUE/FALSE), those values are ignored during the calculation. However, cells containing the number zero (0) are included.




