Ultrafast imaging modes, such as coherent planewave compounding (CPWC), increase image uniformity and reduce grating lobe artifacts by dynamic receive apertures. The focal length and the desired aperture width maintain a given ratio, which is called the F -number. Fixed F -numbers, however, exclude useful low-frequency components from the focusing and reduce the lateral resolution. Herein, this reduction is avoided by a frequency-dependent F -number. This F -number derives from the far-field directivity pattern of a focused aperture and can be expressed in closed form. The F -number, at low frequencies, widens the aperture to improve the lateral resolution. The Fnumber, at high frequencies, narrows the aperture to avoid lobe overlaps and suppress grating lobes. Phantom and in-vivo experiments with a Fourier-domain beamforming algorithm validated the proposed F -number in CPWC. The lateral resolution, which was measured by the median lateral full widths at half maximum of wires, improved by up to 46.8 % and 14.9 % in a wire and a tissue phantom, respectively, in comparison to fixed F -numbers. Grating lobe artifacts, which were measured by the median peak signal-to-noise ratios of wires, reduced by up to 9.9 dB in comparison to the full aperture. The proposed F -number thus outperformed F -numbers that were recently derived from the directivity of the array elements.