Accurate and reliable prediction of the future capacity degradation of lithium-ion batteries is crucial for their application in electric vehicles. Recent publications have highlighted the effectiveness of deep learning, in particular, in generating precise forecasts regarding the aging patterns. However, large quantities of training data covering various aging behaviors are required to train such models effectively. Collecting such a large database centrally is not feasible due to privacy and data communication restrictions of data owners, such as testing facilities or fleet operators. Federated learning provides a solution to this open issue. A framework, which incorporates federated learning into the training of a data-based battery aging model, is presented in this paper. The benefit of federated learning is that even data owners with sensible information can participate in a collaborative model training, since the model training is only conducted locally and all the data remains local and does not have to be disclosed. Thus, more data owners are likely to participate in this collaborative training. This will improve the prediction performance due to the enlarged dataset that can be utilized for the model training. This work shows that the prediction accuracy of the model trained with federated learning is only slightly worse than the prediction results obtained by the ideal case in which all aging data is stored in a central database. A sensitivity analysis is presented to prove the robustness of federated learning even if the datasets between participating data owners are highly imbalanced or exhibit different aging behaviors. Within exemplary scenarios, it is shown that individual data holders can reduce their prediction errors from to by participating in the proposed federated learning-based framework.