LOGEST Function in Excel
Master the LOGEST function to calculate exponential regression statistics. Learn curve fitting for growth trends with practical examples and error solutions.
=LOGEST(known_y's, [known_x's], [const], [stats])Quick Answer
LOGEST function LOGEST function calculates exponential regression for growth/decay patterns. Use `=LOGEST(known_y's, [known_x's], [const], [stats])` to fit data to y = b*m^x where m is the growth multiplier and b is the constant. Returns m=1.25 for 25% growth. Perfect for compound interest, population trends, and investment returns. Enter as array formula (Ctrl+Shift+Enter in older Excel) to get all coefficients.
=LOGEST(known_y's, [known_x's], [const], [stats])- Returns m=1.25 for 25% growth
Practical Examples
Basic Sales Growth Analysis
Calculate exponential growth rate for quarterly sales data showing compound acceleration
Population Growth with Statistics
Model city population growth with full statistical output for validation
Investment Growth Projection
Calculate compound annual growth rate (CAGR) for investment portfolio performance
Multi-Variable Product Analysis
Model sales based on price, advertising spend, and market share using multiple exponential predictors
Exponential Decay - Radioactive Half-Life
Calculate decay rate for radioactive isotope and determine half-life period
Common Errors and Solutions
LOGEST returns #NUM! error when processing data
The most common cause is that known_y's values contain zero or negative numbers. LOGEST requires all y-values to be strictly positive (> 0) since exponential curves cannot pass through or below zero—you cannot take the logarithm of non-positive values. Another cause is insufficient data points (need at least 3 for meaningful exponential regression). Also occurs with extreme values causing numerical overflow in calculations.
1. Verify all y-values are strictly positive using MIN(): =IF(MIN(known_y's)>0, LOGEST(...), "Invalid: negative/zero values") 2. Remove or replace any zero/negative values from the dataset 3. For data that crosses zero, add an offset to make all values positive: =LOGEST(known_y + offset, known_x) where offset = ABS(MIN(known_y)) + 1 4. Check data range contains at least 3 data points; 8+ recommended for reliability 5. Ensure x-values don't contain text, errors, or non-numeric entries 6. For very large y-values (>1E+10), consider scaling down by dividing by constant to prevent overflow 7. Verify data isn't perfectly linear (use scatter plot)—if linear, use LINEST instead 8. Use data validation to prevent invalid entries: Data > Validation > Allow: Decimal > Minimum: 0.01
Always validate data range before applying LOGEST. Use formula: =IF(AND(MIN(known_y's)>0, COUNT(known_y's)>=3), LOGEST(...), "Data validation failed"). For datasets that might include negative values, pre-process with FILTER: =LOGEST(FILTER(known_y, known_y>0), FILTER(known_x, known_y>0)). Apply conditional formatting to highlight non-positive values: Format Cells > Conditional Formatting > Highlight cells <= 0 in red.
Example:
Formula returns #REF! when array formula not properly entered
LOGEST returns an array of values (multiple coefficients) but wasn't entered as an array formula in Excel 2019 or earlier, or the selected range is too small to accommodate all returned values. When stats=TRUE, LOGEST returns 5 rows of data, but only one cell was selected. Also occurs if cell references in the formula are invalid or refer to deleted rows/columns.
1. Select appropriate cell range BEFORE entering formula: 1×2 for basic coefficients (stats=FALSE), 5×2 for full statistics (stats=TRUE, single x-variable) 2. For multiple x-variables, select 5 rows × (number of x-variables + 1) columns 3. After typing formula in selected range, press Ctrl+Shift+Enter (not just Enter) in Excel 2019 or earlier 4. Excel will add curly braces {=LOGEST(...)} in formula bar indicating successful array entry 5. Never type curly braces manually—they must appear automatically from Ctrl+Shift+Enter 6. For single value extraction without array complexity, use INDEX: =INDEX(LOGEST(y,x),1) extracts m coefficient only 7. Excel 365 and Google Sheets handle dynamic arrays automatically—simply press Enter and results spill to adjacent cells 8. Clear cells in spill range if #SPILL! error appears in Excel 365 9. Verify referenced ranges haven't been deleted; rebuild formula if necessary
Pre-select correct range size based on parameters. For stats output with 1 x-variable, always select 5 rows × 2 columns before entering formula. For stats output with 3 x-variables, select 5 rows × 4 columns. Modern Excel 365 and Google Sheets auto-spill arrays, but older versions require manual range selection and array entry. Document array size requirements in cell comments for team collaboration.
Example:
LOGEST returns #VALUE! error during calculation
The known_y's or known_x's ranges contain non-numeric data including text, blank cells, logical values (TRUE/FALSE), or error values from other formulas. Another cause is dimension mismatch—if known_x's is provided, it must have the same number of rows as known_y's. For multiple x-variables, all x-columns must have matching row counts. Also occurs with text formatted as numbers.
1. Check both ranges contain only numeric values using ISNUMBER validation: =FILTER(B2:B10, ISNUMBER(B2:B10)) 2. Remove blank cells or replace with IFERROR: =LOGEST(IFERROR(B2:B10,""), A2:A10) 3. Ensure known_y's and known_x's have matching dimensions: =ROWS(B2:B10) should equal =ROWS(A2:A10) 4. For multiple x-variables, verify column count and row alignment across all ranges 5. Use CLEAN function to remove non-printable characters: =LOGEST(CLEAN(B2:B10), A2:A10) 6. Convert text-formatted numbers to values: =LOGEST(VALUE(B2:B10), A2:A10) 7. Check for merged cells disrupting range continuity—unmerge cells in data ranges 8. Use COUNT() to identify issues: =COUNT(B2:B10) should equal expected number of data points 9. Verify formula syntax is correct with proper parentheses and comma separators 10. Clear formatting and reformat cells as Number: Home > Number > Number format
Validate data types before calculation using helper columns: =IF(ISNUMBER(A2), A2, "ERROR: Non-numeric"). Implement data validation rules on input ranges to prevent text entry: Data > Data Validation > Allow: Decimal. Use Excel Tables with structured references (Table1[Sales]) for automatic range management. Apply conditional formatting to highlight non-numeric cells: Custom format with =NOT(ISNUMBER(A1)) formula.
Example:
LOGEST produces #N/A with insufficient or collinear data
The data points are collinear (perfectly linear relationship causing calculation failure in exponential regression), or there are too few data points for the number of variables. Multi-variable exponential regression requires at least n+2 data points where n is the number of x-variables. Also occurs when all x-values are identical (no variation) or when x-variables are perfectly correlated (multicollinearity), creating singular matrix that cannot be inverted.
1. Increase number of data points: minimum 3 for simple regression, recommended 8+ for reliability 2. For multiple regression, ensure observations > variables: need n_observations ≥ n_variables + 2 3. Check for duplicate x-values causing singularity—ensure each x has unique or varied values 4. Test for multicollinearity in multiple regression: calculate CORREL() between x-variable pairs 5. If correlation between x-variables > 0.95, remove one redundant variable from analysis 6. Verify x-values have sufficient variation using STDEV: =STDEV(known_x's) should be > 0 7. Verify data actually has exponential (not perfectly linear) relationship—create scatter plot 8. If perfectly linear, use LINEST instead of LOGEST for more appropriate analysis 9. Check for data entry errors creating perfect mathematical relationships (e.g., y = 2×x exactly) 10. Ensure x-columns aren't identical or simple multiples of each other
Before using LOGEST, create scatter plot to visualize data pattern and confirm exponential curve (not straight line). If perfectly straight line, use LINEST instead. Ensure adequate sample size: general rule is 3× the number of variables as minimum data points. For multi-variable analysis, create correlation matrix of all x-variables beforehand: =CORREL(x1, x2) for all pairs. Remove variables with correlation > 0.90 to prevent collinearity. Use Excel's UNIQUE function to verify x-values aren't all identical: =COUNTA(UNIQUE(known_x's)) should be > 1.
Example:
Advanced Tips and Best Practices
Always Use Array Formula Entry (Older Excel Versions)
LOGEST returns multiple values simultaneously, so proper array formula entry is critical in Excel 2019 and earlier versions. The function returns at minimum two values (m and b) for simple regression, and up to 5 rows × multiple columns for full statistics with multiple variables. To enter correctly: (1) Select the exact range needed—1 row × 2 columns for basic coefficients with stats=FALSE, 5 rows × 2 columns for full stats with stats=TRUE and single x-variable. (2) Type the LOGEST formula completely with all parameters. (3) Instead of pressing Enter, press Ctrl+Shift+Enter simultaneously. Excel will display curly braces {=LOGEST(...)} in the formula bar confirming successful array entry. Never type the curly braces manually—they must appear automatically from the Ctrl+Shift+Enter keystroke. If you see only one value instead of the expected array, the array entry failed and must be repeated. Excel 365 and Google Sheets have dynamic array support with automatic spilling, so simply press Enter and results expand automatically to adjacent cells. For maximum compatibility across Excel versions, use INDEX to extract specific values: =INDEX(LOGEST(B2:B10,A2:A10),1) for m coefficient avoids array complexity entirely.
Extract Specific Values with INDEX for Clean Dashboards
For backward compatibility across Excel versions or when you need only specific coefficients, use INDEX to extract individual values from the LOGEST array. This approach avoids array formula complexity and works identically in Excel 2010, 2019, 365, and Google Sheets. INDEX syntax: =INDEX(array, row, column). For LOGEST output with stats=FALSE, INDEX(LOGEST(...),1) returns m (growth multiplier), and INDEX(LOGEST(...),2) returns b (base constant). For full statistics with stats=TRUE, INDEX(LOGEST(...),3,1) extracts R-squared from row 3 column 1, INDEX(LOGEST(...),4,1) extracts F-statistic, and INDEX(LOGEST(...),3,2) gets standard error of y-estimate. This method creates clean, labeled dashboard outputs that non-technical stakeholders understand: 'Growth Rate: 15%' using =(INDEX(LOGEST(...),1)-1)*100 instead of displaying raw array. Another efficiency technique: calculate LOGEST once in a hidden area (like cells Z1:AA5) then use multiple INDEX formulas referencing those cells: =INDEX($Z$1:$AA$5,3,1) for R-squared. This prevents recalculating the entire regression multiple times, improving workbook performance with large datasets.
Calculate R-Squared for Model Fit Quality Validation
When using stats=TRUE, the R-squared value (located in row 3, column 1 of the output array) is the single most important metric for validating whether the exponential curve fits your data appropriately. R-squared ranges from 0 to 1 and represents the proportion of variance in y explained by the exponential model. Interpretation guidelines: R² > 0.95 indicates excellent fit suitable for confident forecasting and strategic decision-making. R² between 0.80-0.95 shows good fit appropriate for business analysis and trend identification. R² between 0.60-0.80 suggests moderate fit—use predictions cautiously and consider external factors. R² < 0.60 indicates weak fit—the exponential model may not be appropriate for your data; test linear regression (LINEST) instead. To extract R-squared: =INDEX(LOGEST(y,x,TRUE,TRUE),3,1). Compare exponential vs linear fits by calculating both: Exponential R² = INDEX(LOGEST(y,x,TRUE,TRUE),3,1) and Linear R² = RSQ(y,x). If exponential R² exceeds linear R² by more than 0.05, exponential is the superior model. Always report R-squared alongside predictions to communicate forecast reliability: 'Q4 forecast: $50K (R²=0.92)' gives stakeholders confidence in the model.
LOGEST Cannot Handle Negative or Zero Y-Values
Critical limitation: exponential curves of the form y = b × m^x are mathematically always positive for real coefficients. LOGEST requires all y-values to be strictly positive (> 0) because it transforms data using natural logarithms, and ln(0) and ln(negative) are undefined. If your dataset includes negative values or crosses zero, LOGEST will return #NUM! error. Common scenarios with this limitation: profit/loss data crossing zero (losses are negative), temperature data including values below zero, net cash flow with negative periods, or survey responses on scales including negative values. Solutions: (1) Add constant offset to make all values positive: =LOGEST(original_y + ABS(MIN(original_y)) + 1, x). Remember to subtract the same offset from predictions. (2) Analyze positive and negative values separately if they represent distinct regimes. (3) Use polynomial regression with LINEST and x, x², x³ terms for data crossing zero. (4) Consider whether exponential is theoretically appropriate—many processes crossing zero follow different mathematical relationships. (5) For temperature data in Celsius/Fahrenheit, convert to Kelvin (always positive) for exponential analysis. Important: Don't arbitrarily offset data just to use LOGEST—ensure exponential growth/decay is theoretically justified for your phenomenon.
Combine with GROWTH Function for Complete Forecasting Workflow
After using LOGEST to determine and validate exponential regression coefficients, use the GROWTH function for actual predictions and forecasting. This division of labor creates more efficient and maintainable spreadsheets. GROWTH uses the same exponential regression methodology as LOGEST but returns predicted y-values for new x-values rather than statistical parameters. The workflow: (1) Run LOGEST with stats=TRUE to assess model quality—check R-squared > 0.80 and examine standard errors. (2) Extract and display key statistics using INDEX for validation documentation. (3) If model is validated, use GROWTH for all forecasting: =GROWTH(known_y, known_x, new_x) generates predictions efficiently. (4) Calculate confidence intervals around GROWTH predictions using standard error from LOGEST row 3, column 2: Prediction ± 2×SE for 95% confidence. (5) Document assumptions: 'Forecast based on exponential model with R²=0.92, validated through LOGEST analysis.' This separation—LOGEST for validation and analysis, GROWTH for production forecasting—creates professional analytical systems. Store LOGEST statistics in a hidden 'Model Statistics' sheet for reference while using GROWTH in visible dashboards and reports. This approach provides statistical rigor while maintaining user-friendly, understandable interfaces for stakeholders.
Validate With Visual Scatter Plot Before Using LOGEST
Before investing effort in LOGEST analysis, create a scatter plot with exponential trendline to visually confirm your data follows an exponential pattern rather than linear or other relationships. This critical validation step prevents misapplication of exponential regression to inappropriate data. Process: (1) Select your x and y data ranges. (2) Insert scatter chart: Insert > Charts > Scatter. (3) Click any data point, then right-click > Add Trendline. (4) In trendline options, select 'Exponential' type and check 'Display Equation' and 'Display R-squared value'. (5) Examine the visual fit—does the exponential curve closely follow your data points, or does it systematically deviate? (6) Check the displayed R-squared value—values > 0.80 indicate exponential is appropriate. (7) For comparison, add a second trendline with 'Linear' type to see which fits better. If the exponential curve shows significantly better visual fit and higher R-squared than linear, proceed with LOGEST. If the data forms a relatively straight line and linear R-squared exceeds exponential R-squared, use LINEST instead. Visual validation catches issues that pure statistical metrics might miss, such as outliers distorting the regression, structural breaks in the data, or non-monotonic patterns. This professional practice ensures your analytical approach matches your data's actual behavior.
Need Help with LOGEST Function in Excel?
Stop struggling with formula syntax. Use AskFormulas to generate validated formulas instantly with our AI-powered tool.
Example Excel formula:
Related Formulas
Master the AVERAGE function with practical examples and error solutions. Learn to calculate mean values and analyze data efficiently in Excel and Sheets.
Master the AVERAGEIF function to calculate conditional averages. Learn syntax, examples, and error solutions for Excel and Google Sheets.
Master the BETA.INV function to calculate inverse beta distributions for statistical modeling, risk analysis, and project management in Excel and Google Sheets.
Master the CHISQ.DIST function in Excel for chi-square probability distributions. Learn cumulative and probability density calculations with examples.