The present invention relates to a system and a method for measuring humidity in a ventilated space (3) comprising humidity sensing means (10), a heating device (201), and a control system (301) having access to pre-stored values on saturation vapour content of air at different temperatures. The relative humidity, Hrel(T1), at a first temperature, T1, is measured, with the heating device inactivate. For TI a pre-stored saturation vapour content value, Vsat(T1), is found. A first absolute humidity value, Vc(T1), is calculated by multiplying the first saturation vapour content value by the first relative humidity value. A second relative humidity, Hrel(T2), at T2 is measured, with the heating device on, a second vapour content value, Hsat(T2), at T2 is found and a nominal relative humidity value, RIInom, is calculated by dividing the first absolute humidity value, Vc(T1), by the second saturation vapour content value, Vsat(T2). The difference, ΔRH, between the second measured relative humidity value, Hrel(T2), and the nominal relative humidity value, RHnom, is established and used to adjust subsequent relative humidity measurements for error compensation.