A method of fitting a hearing aid comprising the steps of: - providing an earpiece, said earpiece having an electrical-acoustical output transducer adapted for directing sound towards the eardrum when the earpiece is inserted in the ear canal of a user and an acoustical-electrical input transducer adapted for measuring a sound pressure at the side of the earpiece facing the eardrum when the earpiece is inserted in the ear canal of the user; - connecting the earpiece to a first end of a sound conduit of a predetermined length, providing a test sound into the sound conduit using the electrical-acoustical output transducer, and measuring a first sound pressure at the first end of the sound conduit using the acoustical-electrical input transducer; - inserting the earpiece into the ear canal of the user, providing a test sound into the ear canal using the electrical-acoustical output transducer; and measuring a second sound pressure using the acoustical-electrical input transducer, - determining a third sound pressure as an estimate of the first sound pressure that would have been measured if the sound conduit had been of infinite length; - determining a scaling constant that when multiplied with the third sound pressure, provides an estimate of the third sound pressure that would have been measured if the sound conduit had a diameter corresponding to the diameter of the ear canal of the user; - estimating the sound pressure at the eardrum of the user, for a given receiver excitation, as the sum of the second sound pressure and the third sound pressure multiplied with the scaling constant, hereby estimating a real ear response; and - setting a hearing aid gain taking into account the estimated real ear response. - providing an earpiece, said earpiece having an electrical-acoustical output transducer adapted for directing sound towards the eardrum when the earpiece is inserted in the ear canal of a user and an acoustical-electrical input transducer adapted for measuring a sound pressure at the side of the earpiece facing the eardrum when the earpiece is inserted in the ear canal of the user; - connecting the earpiece to a first end of a sound conduit of a predetermined length, providing a test sound into the sound conduit using the electrical-acoustical output transducer, and measuring a first sound pressure at the first end of the sound conduit using the acoustical-electrical input transducer; - inserting the earpiece into the ear canal of the user, providing a test sound into the ear canal using the electrical-acoustical output transducer; and measuring a second sound pressure using the acoustical-electrical input transducer, - determining a third sound pressure as an estimate of the first sound pressure that would have been measured if the sound conduit had been of infinite length; - determining a scaling constant that when multiplied with the third sound pressure, provides an estimate of the third sound pressure that would have been measured if the sound conduit had a diameter corresponding to the diameter of the ear canal of the user; - estimating the sound pressure at the eardrum of the user, for a given receiver excitation, as the sum of the second sound pressure and the third sound pressure multiplied with the scaling constant, hereby estimating a real ear response; and - setting a hearing aid gain taking into account the estimated real ear response.