Apparatus for measuring air flow in a duct, e.g. in a ventilation duct, wherein the apparatus comprises a sensor fittable into connection with the duct, the sensor comprising an ultrasound transmitter and at least two ultrasound receivers (102, 104), and a control unit to which the ultrasound transmitter and ultrasound receivers are connectable, and the control unit is adapted to measure, during the measuring of air flow, the phase difference of an ultrasound signal received at the same moment in time by the at least two ultrasound receivers (102, 104) fitted into connection with the duct and, based on the measured phase difference, to determine the flow velocity and/or flow direction of the air, wherein the apparatus further comprises means, arranged in connection with the duct, for measuring distance, and the apparatus is adapted to measure the size of the duct, such as the internal diameter of the duct, with the means for measuring distance, the apparatus is adapted to perform a calibration of the apparatus by transmitting with the ultrasound transmitter at least one calibration signal and by receiving the calibration signal with the at least two ultrasound receivers (102, 104), the apparatus is adapted to perform calibration according to the size of the duct, or of a part thereof, in which case the values to be measured and/or the parameters to be used in a series of calibration measurements are selected on the basis of the size of the duct, or of a part thereof, and the apparatus is further adapted to analyze the received calibration signal and, based on the analysis, to select the parameters to be used in measuring to be such that at least one analysis result of the calibration signal meets predetermined criteria with the parameters, wherein the parameters to be selected and to be used in the measuring are the duration of the measuring signal to be sent, the frequency of the measuring signal to be sent, the strength of the measuring signal to be sent, the length of the measuring window of the ultrasound receiver and/or the starting place of the measuring window of the ultrasound receiver. the apparatus comprises a sensor fittable into connection with the duct, the sensor comprising an ultrasound transmitter and at least two ultrasound receivers (102, 104), and a control unit to which the ultrasound transmitter and ultrasound receivers are connectable, and the control unit is adapted to measure, during the measuring of air flow, the phase difference of an ultrasound signal received at the same moment in time by the at least two ultrasound receivers (102, 104) fitted into connection with the duct and, based on the measured phase difference, to determine the flow velocity and/or flow direction of the air, wherein the apparatus further comprises means, arranged in connection with the duct, for measuring distance, and the apparatus is adapted to measure the size of the duct, such as the internal diameter of the duct, with the means for measuring distance, the apparatus is adapted to perform a calibration of the apparatus by transmitting with the ultrasound transmitter at least one calibration signal and by receiving the calibration signal with the at least two ultrasound receivers (102, 104), the apparatus is adapted to perform calibration according to the size of the duct, or of a part thereof, in which case the values to be measured and/or the parameters to be used in a series of calibration measurements are selected on the basis of the size of the duct, or of a part thereof, and the apparatus is further adapted to analyze the received calibration signal and, based on the analysis, to select the parameters to be used in measuring to be such that at least one analysis result of the calibration signal meets predetermined criteria with the parameters, wherein the parameters to be selected and to be used in the measuring are the duration of the measuring signal to be sent, the frequency of the measuring signal to be sent, the strength of the measuring signal to be sent, the length of the measuring window of the ultrasound receiver and/or the starting place of the measuring window of the ultrasound receiver.