An algorithm able to deal with any desired fitting model was developed for regression problems with uncertain and correlated variables.A typical application concerns the determination of calibration curves, especially (i) in those cases in which the uncertainties on the independent variables xi cannot be considered negligible with respect to those associated with the dependent variables yi, and (ii) when correlations exist among xi and yi. In the metrological field, several types of software have already been dedicated to the determination of calibration curves, some being focused just on problem (i) and a few others considering also problem (ii) but only for a straight-line fitting model. The proposed algorithm is able to deal with problems (i) and (ii) at the same time, for a generic fitting model. The tool was developed in the MATLAB® environment and validated on several benchmark data sets, fitted with linear and non-linear regression models.A review of the most commonly applied approximations to the parameter uncertainty is also presented, together with a Monte Carlo method proposed for comparison purposes with the results provided by the formula for the uncertainty evaluation which is implemented in the software.