# What do the fit status mean?

**URL:** <https://root-forum.cern.ch/t/what-do-the-fit-status-mean/36052>\
**Category:** Newbie\
**Created:** [September 17, 2019, 11:51am UTC](https://root-forum.cern.ch/t/what-do-the-fit-status-mean/36052 "2019-09-17T11:51:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christoph\_Vogl](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/christoph_vogl/32/19258_2.png) [@Christoph\_Vogl](https://root-forum.cern.ch/u/Christoph_Vogl)\
**Post date:** [September 17, 2019, 11:51am UTC](https://root-forum.cern.ch/t/what-do-the-fit-status-mean/36052/1 "2019-09-17T11:51:40Z")

</div>

After fitting some function to some data one can retrieve the fit status via, e.g.

```auto
r = hSpectrumCalibration->Fit(f1, "R0MS");
status = r->Status();

```

But what do those values of `status` actually mean?  
So far I belive 0 is CONVERGED, negative values are FAILED and 4000 is OK.

But I could not find any information in the documentation [1] on that, beside other people asking for the same thing a year ago [2].

[1] [https://root.cern.ch/root/html600ROOT\_\_Fit\_\_FitResult.html#ROOT\_\_Fit\_\_FitResult:Status](https://root.cern.ch/root/html600ROOT __Fit__ FitResult.html#ROOT __Fit__ FitResult:Status)  
[2] [Fit status documentation](https://root-forum.cern.ch/t/fit-status-documentation/31351)

---

<div class="post-metadata">

**Author:** ![jfcaron](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/7c8e57/32.png) [@jfcaron](https://root-forum.cern.ch/u/jfcaron)\
**Post date:** [September 17, 2019, 6:33pm UTC](https://root-forum.cern.ch/t/what-do-the-fit-status-mean/36052/2 "2019-09-17T18:33:28Z")

</div>

I think it depends on the minimizer algorithm used, that’s why the documentation doesn’t explicitly say what the different values mean.

You can use IsValid() to get a boolean yes/no, otherwise you’ll have to dig into the specific minimizer algorithm.

Edit: I just tried to look for that information for TMinuit and the Linear fitter, but I didn’t get very far.
