The method involves applying alternating heat to a sample whose heat capacity is to be measured using a given repetition frequency of an ac heat source. The alternating temperature of the sample is determined. The heat capacity of the sample is measured on the basis of an amplitude of the temperature curve and a phase difference between the ac heat and the ac temperature. The heat may be applied to the sample by applying alternating current to a heating device near the sample. The method may be used to measure the heat capacity of a fluid sample. A sample cell (11) is used that has a tube (12), which can hold the fluid sample and is provided in a heat bath (13).