Chi-Square (χ²) Fit Calculator
Evaluate goodness-of-fit between measured data and theoretical model predictions
Parameters
Controls
Calculated Values
Examples
Linear model check
Four points with σᵢ ≈ 1; Eᵢ from best-fit line.
- χ²:
- χ²_red:
Ideal gas at four temperatures
Compare measured P to PV=nRT prediction.
- Accept if χ²_red ≈ 1:
Visualization
Chi-Square Goodness of Fit
The chi-square statistic measures how well experimental data agree with a theoretical model, weighted by measurement uncertainty. Large χ² means residuals (O − E) are large compared to your stated errors.
For n data points and p fitted parameters, χ² = Σᵢ (Oᵢ − Eᵢ)² / σᵢ². Each term is dimensionless because the residual is divided by the expected standard deviation σᵢ.
Degrees of freedom ν = n − p. For a simple consistency check with no fitted parameters (p = 0), use ν = n − 1. Reduced chi-square χ²_red = χ² / ν should be near 1 if the model and uncertainties are correct.
Rule of thumb: 0.5 ≲ χ²_red ≲ 1.5 suggests acceptable agreement. χ²_red ≫ 2 often means underestimated σᵢ, wrong model Eᵢ, or systematic errors. χ²_red ≪ 1 may mean overestimated uncertainties.
Always use σᵢ from Error Propagation or instrument specs — not the spread of repeated trials unless those trials are independent measurements of the same quantity.
χ² is widely used in particle physics, astronomy, and any lab comparing a curve (Hooke’s law, ideal gas, radioactive decay) to measured points.
Key Concepts
- χ² = Σ (O − E)² / σ²
- ν = n − p (degrees of freedom)
- χ²_red = χ² / ν ≈ 1 for good fit
- Each point contributes (O−E)²/σ² to the total
- Underestimated σ inflates χ²_red artificially
Real-World Applications
- Verifying linear fit (F = kx) through spring data
- Checking ideal gas law at multiple temperatures
- Comparing measured decay rates to exponential model
- Assessing whether outliers dominate a dataset
Explore Further
- All Measurement & Uncertainty Calculators
Browse every measurement & uncertainty solver in this category.
- Physics Lab & Mechanics Formulas
Apply propagated uncertainties to kinematics and force experiments.
- Physics Constants Reference
SI values for c, G, k_B, ε₀, and more used across solvers.
More measurement uncertainty tools
- Error Propagation
Combine measurement uncertainties for sums, products, quotients, and powers in experimental formulas.
- Significant Figures
Round measurements and calculated results to the correct precision for lab reports.
Physics Equations
Step-by-Step Solution
See how the main results are calculated.
Step 1: Organize data table
For each point: observed Oᵢ, model prediction Eᵢ, uncertainty σᵢ.
Result:
Explanation:
σᵢ should come from measurement error or propagated uncertainty, not arbitrary guesses.
Step 2: Point 1 contribution
Compute squared residual weighted by uncertainty.
Equation:
Calculation:
Result:
Explanation:
Residual = 0.500; a 1 error bar means this point agrees well with the model.
Step 3: Point 2 contribution
Compute squared residual weighted by uncertainty.
Equation:
Calculation:
Result:
Explanation:
Residual = 1.000; a 1.2 error bar means this point agrees well with the model.
Step 4: Point 3 contribution
Compute squared residual weighted by uncertainty.
Equation:
Calculation:
Result:
Explanation:
Residual = -1.000; a 0.8 error bar means this point is acceptable with the model.
Step 5: Point 4 contribution
Compute squared residual weighted by uncertainty.
Equation:
Calculation:
Result:
Explanation:
Residual = 0.500; a 1 error bar means this point agrees well with the model.
Step 6: Sum all contributions
Add individual χ²ᵢ terms for total χ².
Equation:
Calculation:
Result:
Step 7: Compute reduced chi-square
Normalize by degrees of freedom to assess overall fit quality.
Equation:
Calculation:
Result:
Explanation:
χ²_red below 0.5 may mean overestimated σ; 0.5–1.5 is good; above 2 suggests model or σ issues.
Step 8: Interpret the fit
Compare χ²_red to unity.
Result:
Frequently Asked Questions (FAQ)
What if reduced χ² is very large?
Likely causes: underestimated σᵢ, wrong model Eᵢ, or systematic errors not included in σ.
Can χ²_red be less than 1?
Yes — often indicates conservative (too large) uncertainty estimates or too few data points.
Should I use σ = instrument resolution or standard deviation of trials?
Use the standard error of the mean √(s²/n) for n independent trials of the same point; use instrument resolution for single readings.
Practice MCQs
- Reduced χ² near 1 generally means:
- If all residuals are zero, χ² equals:
- Halving every σᵢ while keeping O and E fixed will:
- With n = 5 points and p = 2 fitted parameters, ν =
- A point with |O−E| = 2σ contributes approximately:
Related Calculators
These tools connect to the same physics concepts used in this calculator.