The localized surface-plasmon resonances of coinage-metal clusters and nanoparticles enable many applications, the conception and necessary optimization of which require precise theoretical description and understanding. However, for the size range from few-atom clusters through nanoparticles of a few nanometers, where quantum effects and atomistic structure play a significant role, none of the methods employed previously has been able to provide high-quality spectra for all sizes. The main problem is the description of the filled shells of d electrons which influence the optical response decisively. We show that the DFT+U method, employed with real-time time-dependent density-functional theory calculations (RT-TDDFT), provides spectra in good agreement with experiment for silver clusters ranging from 4 to 923 atoms, the latter representing a nanoparticle of 3 nm. Both the electron-hole-type discrete spectra of the smallest clusters and the broad plasmon resonances of the larger sizes are obtained. All calculations use the value of the effective U parameter that provides good results in bulk silver. The agreement with experiment for all sizes shows that the U parameter is surprisingly transferable. Our results open the pathway for calculations of many practically relevant systems including clusters coupled to bio-molecules or to other nano-objects.