The effect of particle size distribution of CdS nanoparticles on the band-edge photoluminescence (PL) spectrum is investigated. The resulting inhomogeneously broadened lineshape is found to be asymmetric and depend on the width of particle size distribution. The calculated lineshape is fitted to the measured PL spectrum of 3.6 nm diameter CdS nanoparticles, which showed the band-edge PL peak around 3.00 eV and that due to recombination at defects at 2.56 eV. The parameters of the PL spectrum of a bulk CdS film are used as inputs for the fitting. The average particle size and the standard deviation of the size distribution are obtained from the analysis. The particle size estimated from the PL data is compared with that obtained from x-ray diffraction measurements.