The method involves providing an aerosol (4) for producing a determined single dose (40), where the aerosol particles contain active substance. The particles of the active substance are mixed with a carrier medium (73) for the single dose of the aerosol. The particle size distribution and the time duration for producing the single dose are determined in the single dose. An independent claim is also included for a device for determining function of a dosing device.