Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Sheets LOGNORMDIST Function: A Complete Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The LOGNORMDIST function in Google Sheets calculates the lognormal distribution for a given value. This is primarily used to find the probability that a variable will fall at or below a specific value when the data is skewed to the right and cannot be negative, such as income levels, stock prices, or biological measurements. To use it, you need the value you are testing, the mean of the natural logarithms of the data, the standard deviation of the natural logarithms of the data, and a boolean (TRUE or FALSE) to determine if you want the cumulative distribution function.

What You'll Need

  • A Google account with access to Google Sheets.
  • A dataset or a specific value (x) you wish to analyze.
  • The mean (mu) and standard deviation (sigma) of the underlying normal distribution (the logs of your data).
  • A basic understanding of the difference between a probability density function and a cumulative distribution function.

Step-by-Step

  1. Prepare Your Data: Open your Google Sheet and enter your known values into separate cells to keep your formula clean. For example, place your target value (x) in cell A2, your mean (mu) in B2, and your standard deviation (sigma) in C2.
  2. Select the Target Cell: Click on the cell where you want the result of the lognormal distribution calculation to appear.
  3. Enter the Function: Type =LOGNORMDIST( into the cell.
  4. Input the Value (x): Click on cell A2 (or type the specific number). This is the value for which you want the distribution. This value must be greater than zero because the logarithm of a non-positive number is undefined.
  5. Input the Mean (mu): Type a comma, then click on cell B2. Crucially, this is not the average of your raw data; it is the average of the natural logarithms of your data.
  6. Input the Standard Deviation (sigma): Type another comma, then click on cell C2. Similar to the mean, this must be the standard deviation of the natural logarithms of your data, not the raw data's standard deviation.
  7. Choose the Cumulative Flag: Type a final comma and enter either TRUE or FALSE.
    • Use TRUE for the Cumulative Distribution Function (CDF). This returns the probability that a value is less than or equal to x. This is the most common usage for risk analysis and statistics.
    • Use FALSE for the Probability Density Function (PDF). This returns the height of the curve at point x, which is used more for plotting the shape of the distribution.
  8. Complete and Execute: Close the parenthesis ) and press Enter. Your result will be a decimal between 0 and 1 (if using TRUE) or a positive value representing the density (if using FALSE).

Common Mistakes

The most frequent error users make with LOGNORMDIST is using the arithmetic mean and standard deviation of the raw dataset instead of the logarithmic mean and standard deviation. A lognormal distribution is defined as a distribution whose logarithm is normally distributed. If you simply calculate =AVERAGE(range) and =STDEV(range) on your raw data and plug those into LOGNORMDIST, your result will be mathematically incorrect. You must first create a helper column using =LN(value) for every data point, and then calculate the mean and standard deviation of that new column.

Another common mistake is entering a zero or a negative number for the 'x' value. Because the function relies on natural logarithms, any value less than or equal to zero is mathematically impossible in this context. Doing so will result in a #NUM! error. Ensure your data cleaning process removes any non-positive values before applying the function.

Users also frequently confuse the TRUE and FALSE flags. If you are trying to find the probability that a project will be completed within a certain number of days (a common use case for lognormal distributions in project management), you must use TRUE. Using FALSE will give you the probability density, which is a point on a curve and does not represent a percentage or probability of occurrence in the way most business users intend.

Tips

To make your sheets more dynamic, use named ranges for your mean and standard deviation. Instead of referencing B2 and C2, you can name those cells "LogMean" and "LogStdDev". Your formula then becomes =LOGNORMDIST(A2, LogMean, LogStdDev, TRUE), which is much easier to read and audit when you share the sheet with colleagues.

If you need to find the value associated with a specific probability (the inverse of the distribution), do not try to manipulate LOGNORMDIST. Instead, use the LOGINV function. This allows you to say, "I want to know the value at the 95th percentile," and the function will provide the corresponding x value.

When visualizing your data, combine LOGNORMDIST with a column of incrementing x-values and set the cumulative flag to FALSE. You can then create a smooth line chart to visualize the "long tail" characteristic of lognormal data, which is helpful for identifying outliers or understanding the skew of your dataset.

Troubleshooting

If your formula returns a #NUM! error, the first thing to check is your 'x' value. If x is 0 or negative, the function cannot calculate a result. Check for hidden zeros or negative signs in your source data. Additionally, check your standard deviation (sigma); this value must be a positive number. A standard deviation of zero or less is mathematically invalid and will trigger an error.

If the result seems wildly incorrect (e.g., a probability of 0.999 when you expected 0.5), double-check that you used the natural log of your data for the mean and standard deviation. If you used the raw average, the distribution curve will be shifted significantly, leading to incorrect probabilities. To fix this, use the =LN() function on your raw data and recalculate your parameters.

If you see a #VALUE! error, it usually means one of the arguments is not a number. Check if your mean or standard deviation cells contain text, spaces, or are formatted as text instead of numbers. Ensure there are no currency symbols typed manually into the cell; use the formatting toolbar instead.

Frequently Asked Questions

What is the difference between NORM.DIST and LOGNORMDIST?

NORM.DIST is used for data that follows a symmetric, bell-shaped curve where values can be positive or negative. LOGNORMDIST is used for data that is skewed to the right and strictly positive, where the natural log of the values follows a normal distribution.

How do I calculate the mean for LOGNORMDIST?

You cannot use the raw average. You must take the natural log of every value in your dataset using =LN(cell), and then calculate the average of those resulting logarithmic values using the =AVERAGE() function.

Why is my probability result always 1 or 0?

This usually happens when your 'x' value is very far from the mean. If x is significantly higher than the mean plus several standard deviations, the cumulative probability will approach 1. If it is very low, it will approach 0. Check your units of measurement to ensure they are consistent across all inputs.

Can I use LOGNORMDIST for financial forecasting?

Yes, it is frequently used for stock prices and real estate values because these assets cannot drop below zero and often exhibit a right-skewed distribution where a few high-value outliers exist.

Does the order of arguments matter?

Yes, the order must be exactly: Value (x), Mean (mu), Standard Deviation (sigma), and Cumulative (TRUE/FALSE). Swapping the mean and standard deviation will lead to an incorrect calculation without necessarily triggering an error message.