Disclosed is a method for the preparation of a triglyceride of medium-chain length fatty acids comprising the steps of: a) mixing glycerol with three molar equivalents or an excess of said medium-chain length fatty acids, wherein each of the medium-chain length fatty acids contains a chain of 6 to 12 carbons; b) reacting the mixture of step (a) with a divalent or trivalent metal cation catalyst; and c) heating at a temperature of 160°C or more, under partial vacuum, for a period of time sufficient to form the triglyceride. Also disclosed is a pharmaceutical formulation comprising at least 99% of triglyceride of medium-chain length fatty acids, wherein the medium-chain length fatty acid contains a chain of 6 to 12 carbons.