In eukaryotes, folate metabolism is compartmentalized and occurs in both the cytosol and the mitochondria. The function of this compartmentalization and the great changes that occur in the mitochondrial compartment during embryonic development and in rapidly growing cancer cells are gradually becoming understood, though many aspects remain puzzling and controversial. We explore the properties of cytosolic and mitochondrial folate metabolism by experimenting with a mathematical model of hepatic one-carbon metabolism. The model is based on known biochemical properties of mitochondrial and cytosolic enzymes. We use the model to study questions about the relative roles of the cytosolic and mitochondrial folate cycles posed in the experimental literature. We investigate: the control of the direction of the mitochondrial and cytosolic serine hydroxymethyltransferase (SHMT) reactions, the role of the mitochondrial bifunctional enzyme, the role of the glycine cleavage system, the effects of variations in serine and glycine inputs, and the effects of methionine and protein loading. The model reproduces many experimental findings and gives new insights into the underlying properties of mitochondrial folate metabolism. Particularly interesting is the remarkable stability of formate production in the mitochondria in the face of large changes in serine and glycine input. The model shows that in the presence of the bifunctional enzyme (as in embryonic tissues and cancer cells), the mitochondria primarily support cytosolic purine and pyrimidine synthesis via the export of formate, while in adult tissues the mitochondria produce serine for gluconeogenesis.