Abstract. Cloud condensation nuclei (CCN) are mediators of aerosol–cloud interactions (ACIs), contributing to the largest uncertainties in the understandings of global climate change. We present a novel remote-sensing-based algorithm that quantifies the vertically resolved CCN number concentrations (NCCN) using aerosol optical properties measured by a multiwavelength lidar. The algorithm considers five distinct aerosol subtypes with bimodal size distributions. The inversion used the lookup tables developed in this study, based on the observations from the Aerosol Robotic Network, to efficiently retrieve optimal particle size distributions from lidar measurements. The method derives dry aerosol optical properties by implementing hygroscopic enhancement factors in lidar measurements. The retrieved optically equivalent particle size distributions and aerosol-type-dependent particle composition are utilized to calculate critical diameters using κ-Köhler theory and NCCN at six supersaturations ranging from 0.07 % to 1.0 %. Sensitivity analyses indicate that uncertainties in extinction coefficients and relative humidity greatly influence the retrieval error in NCCN. The potential of this algorithm is further evaluated by retrieving NCCN using airborne lidar from the NASA ObseRvations of Aerosols above CLouds and their intEractionS (ORACLES) campaign and is validated against simultaneous measurements from the CCN counter. The independent validation with robust correlation demonstrates promising results. Furthermore, the NCCN has been retrieved for the first time using a proposed algorithm from spaceborne lidar – Cloud-Aerosol Lidar with Orthogonal Polarization (CALIOP) – measurements. The application of this new capability demonstrates the potential for constructing a 3D CCN climatology at a global scale, which helps to better quantify ACI effects and thus reduce the uncertainty in aerosol climate forcing.