Understanding why healthcare costs vary between patients and between health facilities is important in guiding health policy decisions as well as in research. However, there is no comprehensive framework that analysts commonly use for expressing and examining causes of cost variation in the field of healthcare. The aim of this study is to better understand the size and causes of within-country healthcare cost variation, through presenting evidence for size and sources of such variations for two countries (Cuba and Thailand) in the context of a randomised controlled trial on antenatal care. The article separates total costs into their two components: unit costs and health service use. Unit costs are further separated into input quantity per patient visit or day, and the prices of these resources. The results show that the main determinant of average cost is the staffing pattern and productivity, whereas the main determinants of health service use include the model of antenatal care being practised and the risk status and illnesses suffered by patients. However, variations in inpatient health service use between facilities are largely related to unexplainable variations in practice between facilities, irrespective of the trial arm. In conclusion, cost variations have important implications for the design of clinical trials and for policy makers using evidence from trials in planning health services and budgets.