MARGINOFERROR

Calculates the amount of random sampling error given a range of values and a confidence level. Learn more

Video field
Statistical

In Google Sheets, the MARGINOFERROR(range, confidence) function calculates the margin of error for a sample range of data, given a specified confidence level.

The margin of error is a measure of the uncertainty or potential variability in the sample data.

The function takes two arguments:

range: This is the range of cells containing the sample data for which you want to calculate the margin of error. It can be a single column or row, or a rectangular range.

confidence: This is the confidence level at which you want to calculate the margin of error. It is expressed as a decimal value between 0 and 1. For example, a confidence level of 0.95 represents a 95% confidence level.

The MARGINOFERROR function in Google Sheets uses the following formula to calculate the margin of error:

MARGINOFERROR(range, confidence) = CONFIDENCE(confidence, STDEVP(range), COUNT(range))

Here, STDEVP calculates the standard deviation of the sample range, and COUNT counts the number of data points in the range.

The CONFIDENCE function then uses the standard deviation and sample size to determine the margin of error at the specified confidence level.

Note that the MARGINOFERROR function assumes a normal distribution of the data in the range and is typically used for calculating the margin of error for a sample mean.

Want even more from Google Sheets?


With Softr, you can turn your spreadsheets into powerful web apps.You can give advanced roles and permissions to each user, build advanced logic and automation flows, customize the design to your needs, and much more.


Softr also offers a growing library of templates for internal tools, client portals, community hubs, and more. The templates come with a Google Sheet or an Airtable base that you can use to store and manage your data easily.


Try Softr now and build your custom web apps in 10 minutes no code required!

Client Portal | Internal Tools | Web App Builder | Free Website Builder Made with Softr