With the widespread use of Lithium-ion (Li-ion) batteries in Electric Vehicles (EVs), Hybrid EVs and Renewable Energy Systems (RESs), much attention has been given to Battery Management System (BMSs). By monitoring the terminal voltage, current and temperature, BMS can evaluate the status of the Li-ion batteries and manage the operation of cells in a battery pack, which is fundamental for the high efficiency operation of EVs and smart grids. Battery capacity estimation is one of the key functions in the BMS, and battery capacity indicates the maximum storage capability of a battery which is essential for the battery State-of-Charge (SOC) estimation and lifespan management. This paper mainly focusses on a review of capacity estimation methods for BMS in EVs and RES and provides practical and feasible advice for capacity estimation with onboard BMSs. In this work, the mechanisms of Li-ion batteries capacity degradation are analyzed first, and then the recent processes for capacity estimation in BMSs are reviewed, including the direct measurement method, analysis-based method, SOC-based method and data-driven method. After a comprehensive review and comparison, the future prospective of onboard capacity estimation is also discussed. This paper aims to help design and choose a suitable capacity estimation method for BMS application, which can benefit the lifespan management of Li-ion batteries in EVs and RESs.