Propagation of uncertainty calculator
Enter the formula you use to get your result, then the value and uncertainty of each measured quantity. The calculator works out the combined uncertainty from the propagation law, shows simplified partial derivatives and the contribution of each quantity, and gives you LaTeX code for the whole calculation. The numbers come from our code running in your browser, not from a language model, so every step can be checked.
Type it like on a calculator: * / ^, sqrt(), sin(), ln(), pi. Quantities are detected for you.
| Quantity | Value | Uncertainty u |
|---|---|---|
| L | ||
| T |
g = 4*pi^2*L/T^2; L = 1 ± 0.002, T = 2 ± 0.001
g = (9.870 ± 0.023) m/s^2
| L | Contribution to u_c | 0.02 |
| T | Contribution to u_c | 0.0099 |
\begin{equation}
g = \dfrac{4 \pi^{2} L}{T^{2}}
\end{equation}
Partial derivatives:
\begin{align}
\frac{\partial g}{\partial L} &= \dfrac{4 \pi^{2}}{T^{2}} \\
\frac{\partial g}{\partial T} &= -\dfrac{8 \pi^{2} L}{T^{3}}
\end{align}
\begin{equation}
u_c(g) = \sqrt{\left(\frac{\partial g}{\partial L}\, u_{L}\right)^2 + \left(\frac{\partial g}{\partial T}\, u_{T}\right)^2}
\end{equation}
\begin{equation}
u_c(g) = \sqrt{(\num{1.97e-2})^2 + (\num{-9.87e-3})^2} = \num{0.0221} \to \num{0.023}
\end{equation}
\[ g = \SI{9.870 \pm 0.023}{m/s^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
- Mean value
- Standard deviation
- Type A uncertainty
- Combined uncertainty
- Uncertainty propagation
- Expanded uncertainty
How it works
- The combined uncertainty follows the propagation law: the square root of the sum of squared partial derivatives times the uncertainties of the inputs.
- Partial derivatives are derived symbolically and simplified, and constants stay symbols: for g from a pendulum you get 4π²/T², not 39.478/T².
- The uncertainty is rounded up to two significant figures and the result to the same decimal place, which is what physics labs ask for.
- The LaTeX code contains the formula, the derivatives, the numeric substitution and the result written with siunitx.
Uncertainties are computed following the GUM, published by the BIPM: JCGM 100:2008 (PDF)
Packages you need
\usepackage{amsmath} % align
\usepackage{siunitx} % \SI{}, \num{}Package documentation on CTAN: amsmath, siunitx
More examples and common mistakes: Derivatives in LaTeX: f'', \dot{x}, \partial^2 f
Frequently asked questions
- How do you calculate propagation of uncertainty?
- For each measured quantity take the partial derivative of the formula, multiply it by the uncertainty of that quantity, square the products, add them and take the square root. The calculator does this for you and shows every step.
- What is the formula for error propagation?
- For independent inputs the combined standard uncertainty is u_c(y) = sqrt(sum of (dy/dx_i times u(x_i)) squared). This is the law of propagation of uncertainty from the GUM guide.
- How do I type the formula?
- Like on a calculator: an asterisk for multiplication, a caret for powers, sqrt(x) for a square root and pi for the constant. Example: 4*pi^2*L/T^2. Letters in the formula become quantities with a value and an uncertainty.
- Does it handle correlated quantities?
- The calculator assumes uncorrelated inputs, measured independently, which is the usual case in a teaching lab. Correlated inputs add covariance terms to the formula.
Other tools
- CSV and Excel to LaTeX table
- LaTeX matrix generator
- Linear regression with uncertainty calculator
- Type A, type B and expanded uncertainty calculator
- Handwriting to LaTeX
Got formulas on paper?
Draw them or snap a photo and CamteX AI turns them into LaTeX and inserts them into your document.