In many practical situations, structures subject to lateral loading are located near slopes. The presence of a slope on deep foundations loaded in a downslope direction can decrease the overall lateral capacity of the system. In this paper, the effect of soil slope, undrained cohesion, pile–soil interface adhesion, pile diameter and pile cap on the lateral load carrying capacity of pile located at the crest of clay slope is studied using PLAXIS-3D. Clay is modelled as linearly elastic perfectly plastic Mohr–Coulomb material, whereas pile is modelled as a linear elastic material. Formation of gap on the extension side of pile–soil interface is also considered. Lateral load capacity of pile for a corresponding prescribed displacement of 5 mm is estimated. An equation to determine the value of lateral pile capacity in terms of undrained cohesion, pile diameter and pile–soil interface adhesion has been formulated from the results.