Abstract: The present invention concerns a procedure for measuring the contents of hydrocarbons in liquids containing such. The liquid to be measured is conducted to a transparent measuring cuvette or equivalent and the measuring cuvette is irradiated with infrared radiation from a radiation source, and the hydrocarbon content present in the liquid is determined on the basis of the difference in absorption between the liquid together with the hydrocarbon in it and the liquid itself. In the procedure is measured the infrared absorption spectrum of the liquid containing hydrocarbons in a preselected, comparatively wide wavelength range (.lambda..sub.beginning,.lambda..sub.end) having a width exceeding that on which the absorption of the hydrocarbon being examined has an effect.