Accurate capacity estimation is critical for reliable and safe operation of lithium-ion batteries. A proposed approach exploiting features from the relaxation voltage curve enables battery capacity estimation without requiring previous cycling information. Machine learning methods are used in the approach. A dataset including 27,330 data units are collected from batteries with LiNi0.86Co0.11Al0.03O2 cathode (NCA battery) cycled at different temperatures and currents until reaching about 71% of their nominal capacity. One data unit comprises three statistical features (variance, skewness, and maxima) derived from the relaxation voltage curve after fully charging and the following discharge capacity for verification. Models adopting machine learning methods, i.e., ElasticNet, XGBoost, Support Vector Regression (SVR), and Deep Neural Network (DNN), are compared to estimate the battery capacity. Both XGBoost and SVR methods show good predictive ability with 1.1 % root-mean-square error (RMSE). The DNN method presents a 1.5% RMSE higher than that obtained using ElasticNet and SVR. 30,312 data units are extracted from batteries with LiNi0.83Co0.11Mn0.07O2 cathode (NCM battery). The model trained by the NCA battery dataset is verified on the NCM battery dataset without changing model weights. The test RMSE is 3.1% for the XGBoost method and 1.8% RMSE for the DNN method, indicating the generalizability of the capacity estimation approach utilizing battery voltage relaxation.