Abstract: A method and device for measuring the distance to an object, particularly the distance to the surface (17) of a liquid in a container (15). An antenna (11) is arranged a distance from and aimed against the surface, the antenna being connected to a measuring unit (12), a channel unit (13) and a control unit (14). A microwave signal with a predetermined frequency is generated in the measuring unit (12), of which a part is utilized as a reference signal, while a further part is input to the antenna (11) and transmitted against the surface (17). From the reflected signal received by the antenna and supplied to the measuring unit (12) and the reference signal, a function of the antenna input reflection coefficient is determined. This function is adapted to the current condition. A fourier transformation of a set of values of this function at a certain set of measuring frequencies is made, from which the distance to the surface is calculated.