Statistics & data
Error bars & acceptable lines
Check a line against measurement uncertainty bars.
Your measurements
Number formats & units
Use decimal dots in datasets. Single values also accept decimal commas and scientific notation such as 1.2e-3 or 1.2 × 10⁻³.
Calculated locally. No account or uploads.
Result & working
ExampleThe calculator is loading. You can read the worked example below.
Download results
Excel and CSV files can be imported into Google Sheets.
More results
Show calculation steps
Interpretation & assumptions
Copy & export
Formula & example
The relationship
What the variables mean
| Symbol | Meaning |
|---|---|
| Absolute measurement uncertainty; each bar extends this far on either side. | |
| Gradient and vertical intercept. | |
| Bounds | Extrema over all straight lines intersecting every rectangular uncertainty region. |
Worked example
- Data: x y Δx Δy
- 1 2.1 0.02 0.2 2 4.0 0.02 0.2 3 6.1 0.02 0.2 4 8.0 0.02 0.2
- Line check
- Find acceptable bounds
- X-axis label / unit
- x / s
- Y-axis label / unit
- y / m
Y = 1.98 X + 0.1
Follow the example steps
- Fit the central values with ordinary least squares: Sxy/Sxx = 9.9/5 = 1.98.
- c = ȳ − mx̄ = 5.05 − (1.98) × 2.5 = 0.1.
- For every point require |y − (mx+c)| ≤ Δy + |m|Δx. Solve all constraints together, considering positive and negative gradients separately.
- All-rectangle gradient bounds: 1.809211 to 2.128378. Δm = (2.128378 − (1.809211))/2 = 0.1595839.
- Optimize intercept separately over all feasible lines: c_min = -0.2709459, c_max = 0.5269737; Δc = 0.3989598.
- Half-range relative to the magnitude of the OLS gradient: 0.1595839 / |1.98| × 100 = 8.059794%. This does not imply that the OLS line is acceptable.
Common mistakes
Test the line against the uncertainty range at every point.
Incorrect approach
x = 2, y = 5 ± 0.2; y = x ⇒ 2 < 4.8
Correct approach
x = 2, y = 5 ± 0.2; y = 2x + 1 ⇒ 5
More checks before you submit
- Uncertainty bars are not automatically standard deviations. State their meaning.
- A least-squares line need not intersect every bar.
- Do not force a fit through the origin without a physical reason.
- Automatic bounds help you check a graph; practice constructing the lines by eye for assessment.
Method notes
Use this to practice drawing acceptable lines and checking every uncertainty bar. With x uncertainty, a line may intersect the rectangle away from its centre. This tool uses rectangular bounds, not a probability ellipse.
Maximum/minimum gradients are found by intersecting linear constraints separately for positive and negative slopes. Intercept bounds are optimized separately: the lines with extreme slope do not necessarily have extreme intercept. The midpoint and half-range summarize bounds; an off-centre best fit is better reported with asymmetric limits.
No acceptable line means these bars and a straight-line model are mutually inconsistent under this criterion. Do not automatically delete points or enlarge bars. If horizontal bars overlap too much, slope bounds can be unbounded; the tool reports this explicitly.