This account already has saved data. Do you want to keep this device's data, or use your account's saved data?
Appearance
Unit System
Temperature Format
Time Format
Confidence Interval
Confidence Interval
[0, 0]
The Numbers
Confidence Interval
[0, 0]
The Numbers
Your Recent & Past Results
Restored a past calculation.
Compare Calculations
Side-by-Side Comparison
A comparison of your calculations' results.
Downloads
Includes your inputs and results for this calculation, plus any additional calculations you've compared.
Share & Print
The link includes your inputs and results, so anyone who opens it sees this exact calculation.
Good to Know
This calculator uses the z-distribution, which assumes a large sample size or a known population standard deviation. For small samples (fewer than about 30) with an estimated standard deviation, the t-distribution is technically more accurate and will produce a slightly wider interval than shown here.
How a Confidence Interval Is Calculated
A confidence interval is a range of values, built around a sample’s own mean, that likely
contains the true population mean. Enter a sample’s mean, standard deviation, and size, choose a
confidence level, and this calculator finds the range within which the actual population mean
probably falls.
A “95% confidence interval,” for example, means that if you repeated the same sampling process
many times, about 95% of the intervals it produced would contain the true population mean. It does
not mean there’s a 95% chance the true mean falls inside this one specific interval — a
common, technically-incorrect way people phrase it. A wider interval (higher confidence level)
casts a wider net and is more likely to contain the true mean; a narrower interval is more precise
but less certain.
The Formula
Standard Error=nsMargin of Error=z×Standard ErrorConfidence Interval=xˉ±Margin of Error
Where s is the sample’s standard deviation, n is the sample size, z is
the critical value for the chosen confidence level (looked up from the standard normal
distribution), and xˉ is the sample mean. A bigger sample size shrinks the standard
error — and therefore the whole interval — since more data gives a more precise estimate of the
true mean.
Worked Example
A sample of 25 items has a mean of 100 and a standard deviation of 15, at a 95%
confidence level (a critical value of z = 1.96):
So the true population mean is likely (with 95% confidence) somewhere between 94.12 and
105.88.
Key Factors to Consider
A confidence interval says nothing about how the sample was collected. The math here assumes
the sample is a genuinely random, representative sample of the population — a biased or
non-random sampling method can produce a confidence interval that looks precise but is centered
on the wrong value entirely, a problem this formula cannot detect or correct for.
The interval assumes the underlying data is at least approximately normally distributed, or
that the sample is large enough for the Central Limit Theorem to apply. For a small sample
from a heavily skewed distribution, both the z-distribution and t-distribution approximations
become less reliable.
A confidence interval and a margin of error reported in a poll or survey describe the same
underlying idea. A news report citing “a margin of error of plus or minus 3 percentage
points” at a stated confidence level (often 95%) is describing exactly the interval this
calculator computes, just phrased differently.
Narrower isn’t always better if it comes at the cost of confidence. A tighter interval at a
lower confidence level (say 80% instead of 95%) is more precise but less likely to actually
contain the true value — the right tradeoff between precision and confidence depends on what the
estimate is being used for.
Common Mistakes
Reading “95% confidence” as “95% probability the true mean is in this interval.” Once a
sample has actually been collected and the interval computed, the true population mean either is
or isn’t inside it — there’s no probability left to talk about. The 95% describes the long-run
behavior of the method across many repeated samples, not this one specific result.
Applying this z-based formula to a small sample without checking the assumptions. The
z-distribution assumes either a large sample (conventionally n of about 30 or more) or a known
population standard deviation. A small sample with only an estimated standard deviation should
technically use the t-distribution instead, which produces a somewhat wider — and more honest —
interval.
Confusing the confidence interval with the range of the raw data. The interval describes
uncertainty about the population mean, not where individual data points fall — a dataset can
have values spread far wider than its confidence interval while the interval on the mean itself
stays narrow, especially with a large sample.
Useful to Know
Because the standard error shrinks with the square root of the sample size rather than the sample
size itself, cutting a margin of error in half generally means roughly quadrupling the sample size,
not just doubling it — a detail that matters when planning how large a survey or experiment
actually needs to be. This is also why polls with only a few hundred respondents can still report a
respectably tight margin of error: once a sample reaches a few hundred, the square-root relationship
means each additional respondent buys progressively less precision, so pollsters rarely see much
value in pushing sample sizes into the tens of thousands just to shave a fraction of a point off the
margin.
Cómo Se Calcula el Intervalo de Confianza
Un intervalo de confianza es un rango de valores, construido alrededor de la media de una
muestra, que probablemente contiene la verdadera media poblacional. Ingresa la media, la
desviación estándar y el tamaño de una muestra, elige un nivel de confianza, y esta calculadora
encuentra el rango dentro del cual probablemente se encuentra la media poblacional real.
Un “intervalo de confianza del 95%”, por ejemplo, significa que si repitieras el mismo proceso de
muestreo muchas veces, alrededor del 95% de los intervalos producidos contendrían la verdadera
media poblacional. No significa que exista un 95% de probabilidad de que la media real se
encuentre dentro de este intervalo específico — una forma común, aunque técnicamente incorrecta,
de expresarlo. Un intervalo más amplio (nivel de confianza más alto) abarca una red más amplia y
es más probable que contenga la media real; un intervalo más estrecho es más preciso pero menos
certero.
La fórmula
Error estaˊndar=nsMargen de error=z×Error estaˊndarIntervalo de confianza=xˉ±Margen de error
Donde s es la desviación estándar de la muestra, n es el tamaño de la muestra,
z es el valor crítico para el nivel de confianza elegido (obtenido de la distribución
normal estándar), y xˉ es la media de la muestra. Un tamaño de muestra mayor reduce
el error estándar — y por lo tanto todo el intervalo — ya que más datos ofrecen una estimación más
precisa de la media real.
Ejemplo resuelto
Una muestra de 25 elementos tiene una media de 100 y una desviación estándar de 15, con
un nivel de confianza del 95% (un valor crítico de z = 1.96):
Error estándar: Error estaˊndar=15÷25=3.
Margen de error: Margen de error=1.96×3=5.88.
Intervalo de confianza: Intervalo de confianza=100±5.88=[94.12,105.88].
Así que la verdadera media poblacional probablemente (con un 95% de confianza) se encuentra en
algún punto entre 94.12 y 105.88.
Factores Clave a Considerar
Un intervalo de confianza no dice nada sobre cómo se recolectó la muestra. Las matemáticas
aquí asumen que la muestra es genuinamente aleatoria y representativa de la población — un
método de muestreo sesgado o no aleatorio puede producir un intervalo de confianza que parece
preciso pero está centrado en un valor completamente incorrecto, un problema que esta fórmula no
puede detectar ni corregir.
El intervalo asume que los datos subyacentes están al menos aproximadamente distribuidos
normalmente, o que la muestra es lo suficientemente grande como para que aplique el Teorema del
Límite Central. Para una muestra pequeña de una distribución muy sesgada, tanto las
aproximaciones de distribución z como t se vuelven menos confiables.
Un intervalo de confianza y un margen de error reportado en una encuesta describen la misma
idea subyacente. Una noticia que cita “un margen de error de más o menos 3 puntos
porcentuales” con un nivel de confianza declarado (a menudo 95%) está describiendo exactamente el
intervalo que calcula esta calculadora, solo expresado de otra forma.
Más estrecho no siempre es mejor si es a costa de la confianza. Un intervalo más ajustado con
un nivel de confianza más bajo (digamos 80% en lugar de 95%) es más preciso pero menos probable
que realmente contenga el valor verdadero — el equilibrio correcto entre precisión y confianza
depende de para qué se está usando la estimación.
Errores Comunes
Interpretar “95% de confianza” como “95% de probabilidad de que la media real esté en este
intervalo”. Una vez que la muestra ya se recolectó y el intervalo ya se calculó, la media
poblacional real o está dentro de él o no lo está — ya no queda ninguna probabilidad de la que
hablar. El 95% describe el comportamiento a largo plazo del MÉTODO a través de muchas muestras
repetidas, no este resultado específico único.
Aplicar esta fórmula basada en la distribución z a una muestra pequeña sin verificar los
supuestos. La distribución z asume una muestra grande (convencionalmente n de alrededor de 30 o
más) o una desviación estándar poblacional conocida. Una muestra pequeña con solo una desviación
estándar estimada técnicamente debería usar la distribución t en su lugar, que produce un
intervalo algo más amplio — y más honesto.
Confundir el intervalo de confianza con el rango de los datos crudos. El intervalo describe
la incertidumbre sobre la media de la población, no dónde caen los puntos de datos individuales
— un conjunto de datos puede tener valores dispersos mucho más ampliamente que su intervalo de
confianza, mientras que el intervalo sobre la media misma permanece estrecho, especialmente con
una muestra grande.
Útil Saber
Debido a que el error estándar se reduce con la raíz cuadrada del tamaño de la muestra en lugar del
tamaño de la muestra en sí, reducir a la mitad un margen de error generalmente significa
cuadruplicar aproximadamente el tamaño de la muestra, no solo duplicarlo — un detalle que importa
al planificar qué tan grande necesita ser realmente una encuesta o experimento. Esto también explica
por qué las encuestas con solo unos pocos cientos de encuestados aún pueden reportar un margen de
error respetablemente ajustado: una vez que una muestra alcanza unos pocos cientos, la relación de
raíz cuadrada significa que cada encuestado adicional aporta progresivamente menos precisión, por
lo que los encuestadores rara vez ven valor en aumentar los tamaños de muestra a decenas de miles
solo para recortar una fracción de punto del margen.
It means that if you repeated the same sampling process many times, about 95% of the resulting intervals would contain the true population mean. It does NOT mean there is a 95% chance the true mean falls inside this ONE specific interval — a common but technically incorrect way to phrase it.
Why does a bigger sample size shrink the interval?
The standard error (and therefore the margin of error) is divided by the square root of the sample size, so more data produces a more precise — and narrower — estimate of the true population mean.
Should I use the z-distribution or the t-distribution?
The z-distribution (used here) is standard for large samples (n of about 30 or more) or when the population's true standard deviation is already known. For a small sample with only an estimated standard deviation, the t-distribution is technically more accurate and produces a slightly wider interval.
What happens if I choose a higher confidence level?
A higher confidence level (e.g. 99% instead of 95%) uses a larger critical z-value, which widens the interval. This is an unavoidable trade-off: casting a wider net makes it more likely the true mean is actually inside the interval, at the cost of a less precise estimate.
How much bigger does my sample need to be to cut the margin of error in half?
About four times bigger, not two. The standard error shrinks with the square root of the sample size, so halving the margin of error requires quadrupling the number of observations — a useful rule of thumb when planning how large a survey or experiment actually needs to be.
Does a confidence interval say anything about how the sample was collected?
No — the math assumes the sample is genuinely random and representative of the population. A biased or non-random sampling method can still produce a confidence interval that looks precise but is centered on the wrong value entirely, a problem this formula has no way to detect or correct for.
Is a confidence interval the same thing as a margin of error?
They describe the same underlying idea from two angles: the margin of error is the plus-or-minus distance from the sample mean, while the confidence interval is the full range that distance creates around it. A news report citing "a margin of error of plus or minus 3 percentage points" at a stated confidence level is describing exactly the interval this calculator computes.
We use cookies for analytics and ads to help support this free site. You can accept all, or decline and we'll only use what's needed for the site to work.