The formulations for the lateral load-displacement (p-y) springs conventionally used for the analysis of laterally loaded piles have been based largely on the back-analysis of the performance of small-scale instrumented piles subjected to lateral load. Although such formulations have been employed with much success in industry, their applicability to large-diameter piles, such as those used to support offshore wind turbines, is uncertain and has necessitated further research in this area. Moreover, with the growth in popularity of in-situ cone penetration tests (CPTs), there are demands for a theoretically supported direct method that can enable the derivation of p-y curves from the CPT end resistance (q c). In this paper, a numerical derivation of CPT-based p-y curves applicable to both small- and large-diameter laterally loaded single piles in sand is presented. Three-dimensional finite-element analyses are performed using a non-linear elasto-plastic soil model to predict the response of single piles in sand subjected to lateral loads. The corresponding CPT q c profile is derived using the same soil constitutive model by way of the cavity expansion analogue. An extensive series of computations of the lateral pile response and CPT q c values is then employed to formulate a direct method of constructing p-y curves from CPT q c values. The proposed method is shown to be generally consistent with existing empirical correlations and to provide good predictions in relation to the measurements obtained during lateral load tests on instrumented piles in an independent case study.