Background Clostridium difficile infection (CDI) is a common and potentially fatal healthcare-associated infection. Improving diagnostic tests and infection control measures may prevent transmission. We aimed to determine, in resource-limited settings, whether it is more effective and cost-effective to allocate resources to isolation or to diagnostics. Methods We constructed a mathematical model of CDI transmission based on hospital data (9 medical wards, 350 beds) between March 2010 and February 2013. The model consisted of three compartments: susceptible patients, asymptomatic carriers and CDI patients. We used our model results to perform a cost-effectiveness analysis, comparing four strategies that were different combinations of 2 test methods (the two-step test and uniform PCR) and 2 infection control measures (contact isolation in multiple-bed rooms or single-bed rooms/ cohorting). For each strategy, we calculated the annual cost (of CDI diagnosis and isolation) for a decrease of 1 in the average daily number of CDI patients; the strategy of the two-step test and contact isolation in multiple-bed rooms was the reference strategy. Results Our model showed that the average number of CDI patients increased exponentially as the transmission rate increased. Improving diagnosis by adopting uniform PCR assay reduced the average number of CDI cases per day per 350 beds from 9.4 to 8.5, while improving isolation by using single-bed rooms reduced the number to about 1; the latter was cost saving. Conclusions CDI can be decreased by better isolation and more sensitive laboratory methods. From the hospital perspective, improving isolation is more cost-effective than improving diagnostics.