Polymeric nanoparticles (NPs) have great application potential in science and technology. Their functionality strongly depends on their size. We present a theory for the size of NPs formed by precipitation of polymers into a bad solvent in the presence of a stabilizing surfactant. The analytical theory is based upon diffusion-limited coalescence kinetics of the polymers. Two relevant time scales, a mixing and a coalescence time, are identified and their ratio is shown to determine the final NP diameter. The size is found to scale in a universal manner and is predominantly sensitive to the mixing time and the polymer concentration if the surfactant concentration is sufficiently high. The model predictions are in good agreement with experimental data. Hence the theory provides a solid framework for tailoring NPs with a priori determined size.