All tools

Type A, type B and expanded uncertainty calculator

Enter the readings of one quantity and the limit of error of your instrument. The calculator gives the mean and standard deviation, the type A uncertainty (from the scatter of the readings), type B (from the accuracy of the instrument), the combined uncertainty and the expanded uncertainty U = k·u_c. You also get the table and the calculation in LaTeX, ready to paste into a lab report. If your lab handout asks for the experimenter uncertainty Δe or a comparison with a reference value, enter them in the optional fields: the calculator adds Δe to type B and runs the agreement test.

Result
g=(9.810±0.028) m/s2(k=2)g = (9.810 \pm 0.028)\ \mathrm{m/s^{2}} \quad (k = 2)

Data: gᵢ = 9.79; 9.82; 9.81; 9.85; 9.78 m/s^2, Δ = 0.01, k = 2, x₀ = 9.80665

g = (9.810 ± 0.028) m/s^2 (k = 2)

Number of measurements
5
Mean
9.81
Standard deviation s
0.027
Type A uncertainty (s/√n)
0.012
Type B uncertainty (Δ/√3)
0.0058
Combined uncertainty u_c
0.014
Expanded uncertainty U = k·u_c
0.028
Difference |x̄ − x₀|
0.0034
Ratio |x̄ − x₀| / u_c
0.25

|x̄ − x₀| / u_c = 0.25 ≤ k = 2

The result agrees with the reference value: the difference is at most k combined uncertainties (|x̄ − x₀| ≤ U).

The threshold is k: 2 in many labs, 3 for the 3σ test.

LaTeX code
\begin{table}[H]
  \centering
  \begin{tabular}{cc}
  \hline
  No. & g [m/s²] \\
  \hline
  \num{1} & \num{9.79} \\
  \num{2} & \num{9.82} \\
  \num{3} & \num{9.81} \\
  \num{4} & \num{9.85} \\
  \num{5} & \num{9.78} \\
  \hline
  \end{tabular}
  \caption{Measurement results}
  \label{tab:measurements}
\end{table}

\noindent Mean value: $\overline{g} = \SI{9.810 \pm 0.014}{m/s^2}$
% u_A = 1.22e-2, u_B = 5.77e-3, u_c = 1.35e-2
\begin{align}
  u_A &= \frac{s}{\sqrt{n}} = \frac{\num{0.0274}}{\sqrt{5}} = \num{0.0122} \\
  u_B &= \frac{\Delta}{\sqrt{3}} = \frac{\num{0.01}}{\sqrt{3}} = \num{0.00577} \\
  u_c &= \sqrt{u_A^2 + u_B^2} = \num{0.0135} \\
  U &= k\,u_c = 2 \cdot \num{0.0135} = \num{0.0271} \to \num{0.028}
\end{align}
\[ g = \SI{9.810 \pm 0.028}{m/s^2} \quad (k = 2) \]
\[ \frac{|\overline{g} - {g}_0|}{u_c} = \frac{|\num{9.81} - \num{9.80665}|}{\num{0.0135}} = \num{0.247} \le k = 2 \]

Turn it into a full lab report

In the CamteX editor the same calculations go straight into your document: the table of measurements, uncertainties, a chart with a fitted line and conclusions. Open a finished pendulum example, with no account and no scans used.

Uncertainty formulas in LaTeX

How it works

Uncertainties are computed following the GUM, published by the BIPM: JCGM 100:2008 (PDF)

Packages you need

\usepackage{amsmath}  % align
\usepackage{float}    % [H]
\usepackage{siunitx}  % \SI{}, \num{}

Package documentation on CTAN: amsmath, float, siunitx

More examples and common mistakes: Mean and standard deviation in LaTeX: \bar{x}, s

Frequently asked questions

What is the difference between type A and type B uncertainty?
Type A comes from the scatter of repeated readings and is evaluated statistically. Type B comes from other sources, usually the accuracy stated by the manufacturer or the smallest division of the instrument.
How do you calculate type A uncertainty?
Find the mean, then the sample standard deviation s using n - 1, and divide it by the square root of the number of readings: u_A = s / sqrt(n).
Why divide by the square root of 3?
When all you know about an instrument is that its error lies between -Δ and +Δ, a rectangular distribution is assumed. Its standard deviation is Δ divided by the square root of 3.
What is expanded uncertainty?
It is the combined uncertainty multiplied by a coverage factor k. With k = 2 the interval result ± U covers the true value with a probability of about 95%.
What is experimenter uncertainty?
It is the uncertainty that comes from how the person takes the reading rather than from the instrument: for example, reaction time when starting and stopping a stopwatch, or reading a scale while the needle keeps moving. The person measuring estimates it, it is written Δe, and it is added to type B: u_B = √(Δ²/3 + Δe²/3).
How do you check if a result agrees with the reference value?
Divide the difference |x̄ − x₀| by the combined uncertainty u_c. If the ratio is at most the coverage factor k, the result agrees within uncertainty. Many labs use k = 2 (the difference is smaller than U = 2u_c), while the 3σ test uses a threshold of 3. The reference value is treated as exact.

Other tools

Got formulas on paper?

Draw them or snap a photo and CamteX AI turns them into LaTeX and inserts them into your document.

Try it free