Your data
Calculated data. Edit its expression or sources in Analyze Data.
Paste columns straight from Excel or Sheets, in the order shown.
Give every measured quantity an uncertainty if you know it: Per point for a different value on each row, Constant for one value that applies to every row. χ²/NDF and the parameter errors depend on them.
Fit model
No data yet. Add measurements in Set up analysis before running a fit.
How histogram fitting works
The model gives counts per unit X. Its integral over each bin predicts the count. Poisson likelihood includes empty bins; χ² uses √count uncertainties and excludes empty bins. Fit-range limits select bins by their centers.
Choose a model, adjust its starting values, then Fit to find the curve that best matches your data.
1. Choose a model
2. Adjust the equation
Use x for your measured variable and letters for the values to fit, such as a x + b.
Use x for the variable and [0], [1]… for parameters. Built-in models include gaus, expo, and pol2. See the typing reference for the full list.
View generated ROOT expression
Typing reference
Equation editor: type sqrt for a square root, / for a fraction, ^ for a power, and _ for a subscript. Use Ctrl/⌘ + Z to undo. Use the arrow keys to move out of a fraction, exponent, or subscript. You can also paste LaTeX.
For Greek letters, type alpha, beta, mu, sigma, tau, lambda, or theta. Use pi for π. Other Greek letters can be entered as LaTeX commands such as \omega, followed by Space. e and π are constants.
Adjacent symbols multiply: ab means a × b. For a parameter with a longer name, use \mathrm{background}. A subscripted symbol such as x_0 is a parameter. Report names can differ from equation symbols.
Functions need parentheses: exp, ln, log, log10, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, sqrt, abs, erf, erfc, pow, min, max, atan2, and sinc. sinc(z) means sin(z)/z, with value 1 at zero. Example: A exp(-x/tau) + B.
ROOT expression: write multiplication as *, division as /, and powers as pow(x,2) or x^2. Parameters are numbered from zero. Named functions such as gaus, gausn, expo, landau, and pol2 are supported. Example: [0]*exp(-x/[1])+[2].
3. Starting values
Step controls −/+ and linear-slider increments. ×10 and ÷10 change only Step and recenter the slider. Values and Step accept scientific notation, such as 1e-12.
Adjustment tips
Blank guesses start from model examples, or 1. Slider ranges do not constrain Fit. Log magnitude keeps the current sign and requires a nonzero guess; use ± to change the sign.
Choose a model and add measurements to set starting values.
Curve doesn't follow the data? Adjust it before running Fit.
Edit values
| Symbol / index | Report name | Initial guess — edit here |
|---|
Paste comma-separated parameters
Use parameter order: [0], [1], [2]… Leave a value blank to keep its default or automatic estimate, where available.
Fit range: full data
Blank limits use the corresponding data bounds. These limits affect the fit.
Plot settings (optional)
Diagnostic plots
Analysis notes
Plot
Inputs differ from this result. Run the analysis again to update the plot and report.
No plot generated.
Fit report
No fit result.