A new algorithm, called the term‐selection algorithm (TSA), is derived to treat small‐angle X‐ray scattering (SAXS) data by fitting models to the scattering intensity using weighted Hermite polynomials. This algorithm exploits the orthogonal property of the Hermite polynomials and introduces an error‐reduction ratio test to select the correct model terms or to determine which polynomials are to be included in the model and to estimate the associated unknown coefficients. With no a priori information about particle sizes, it is possible to evaluate the real‐space distribution function as well as three‐ and one‐dimensional correlation functions directly from the models fitted to raw experimental data. The success of this algorithm depends on the choice of a scale factor and the accuracy of orthogonality of the Hermite polynomials over a finite range of SAXS data. An algorithm to select a weighted orthogonal term is therefore derived to overcome the disadvantages of the TSA. This algorithm combines the properties and advantages of both weighted and orthogonal least‐squares algorithms and is numerically more robust for the estimation of the parameters of the Hermite polynomial models. The weighting feature of the algorithm provides an additional degree of freedom to control the effects of noise and the orthogonal feature enables the reorthogonalization of the Hermite polynomials with respect to the weighting matrix. This considerably reduces the error in orthogonality of the Hermite polynomials. The performance of the algorithm has been demonstrated considering both simulated data and experimental data from SAXS measurements of dewaxed cotton fibre at different temperatures.