"Beverloo's law" is considered as the standard expression to estimate the flow rate of particles through apertures. This relation was obtained by simple dimensional analysis and includes empirical parameters whose physical meaning is poorly justified. In this Letter, we study the density and velocity profiles in the flow of particles through an aperture. We find that, for the whole range of apertures studied, both profiles are self-similar. Hence, by means of the functionality obtained for them the mass flow rate is calculated. The comparison of this expression with the Beverloo's one reveals some differences which are crucial to understanding the mechanism that governs the flow of particles through orifices.