The iFit library (pronounce [eye-fit]) is a set of methods to load, analyse, plot, fit and optimize models, and export results. iFit is based on Matlab, but can also be launched without Matlab license (stand-alone version).Matlab It does not currently include advanced graphical user interfaces (GUI), and rather focuses on doing the math right. Any text file can be imported straight away, and a set of binary files are supported. Any data dimensionality can be handled, including event based data sets (even though not all methods do work for these). Any model can be assembled for fitting data sets. Last, a number of routines are dedicated to the analyses of S(q,w) and S(alpha,beta). More advanced features include the full automation to compute phonon dispersions in materials, using DFT codes such as ABINIT, ELK, VASP, QuantumEspresso, GPAW and more (Models/sqw_phonons). The software can also compute the neutron TAS resolution function (4D) and fits to experimental data with full resolution convolution (ResLibCal). An interface for McStas and McXtrace is also available to automate and optimize instrument simulations.