Oilfield scale formation represents a significant flow-assurance challenge to the oil and gas industry, because of increasing water production worldwide and higher oil prices. Scale-inhibitor (SI) squeeze treatment is the most widespread method to combat downhole scaling. To predict SI squeeze treatments accurately for further optimization, it is necessary to simulate the SI retention in the formation, which may be described by a pseudoadsorption isotherm. Although these are often derived from coreflood experiments, sometimes they are not appropriate for modeling well treatments because the core tests on which they are based cannot fully represent field-scale processes. In practice, the parameters of an analytic form of the isotherm equation are modified by trial and error by an experienced practitioner until a match is obtained between the prediction and the return profile of the first treatment in the field. The main purpose of this paper is to present a stochastic hillclimbing algorithm for automatic isotherm derivation. The performance of the algorithm was evaluated by use of data from three field cases. Two success criteria were defined: the ability to match a single historical treatment and the ability to predict subsequent successive treatments. To test for the second criterion, a candidate isotherm was derived from the first treatment in a well that was treated with the same chemical package on consecutive occasions, and then the predictions by use of the suggested solution were compared with the observed SI concentration-return profiles from the subsequent treatments. In all the calculations, the performances of both the isotherms suggested by the hill-climbing algorithm and the isotherms derived by trial and error were compared. The results demonstrate that the hill-climbing algorithm is an effective technique for deriving an isotherm for a single treatment, although predictions for successive treatments worsened slightly with each treatment.