Determining the thermal conductivity of a material from temperature measurements in a cooling or heating process belongs to the class of inverse problems. In this article, we present a method for a simple experimental setup, consisting of a glass tube containing the material under investigation, two thermistors for temperature monitoring (one at the central axis and the other attached on the outer surface of the tube), and a water heat bath maintained at a desired temperature. We solve the direct problem, i.e., the transient heat conduction equation, treating the thermal conductivity as a parameter whose value is determined by minimizing the difference between the calculated and the experimentally measured temperatures. The method is based on the numerical solution of the one-dimensional transient heat conduction equation in cylindrical coordinates that accurately describes the temperature evolution of a material in a narrow, long glass tube. The technique has been validated by applying it to the lauric and capric acids, whose thermal conductivities are accurately known and therefore it could be a valuable tool for the determination of the thermal properties of phase change materials suitable for thermal storage applications.