A precise expression for the diffraction pattern from a square aperture is derived. The field at the aperture is assumed to be a plane wavefront of constant intensity. The parameters involved are the wavelength λ of the incident light, the distance zc between the aperture and the plane of interest, the dimension D of the square aperture, and the absorption coefficient a of the medium. The presented model is valid for all values of these parameters. It is also applicable to situations in which the Fresnel approximation does not provide an accurate solution anymore. It turns out that the intensity distribution is determined solely by the values of two dimensionless numbers: D2/(λzc) and λ/zc. Computational results are given for 200 nm ≤ λ ≤ 600 nm; 10-3 μm ≤ zc ≤ 100 μm; and 1 μm ≤ D ≤ 100 μm.