ObjectiveTo develop a framework to estimate the practical costs incurred from, and programmatic impact related to, tuberculosis (TB) infection testing—tuberculin skin tests (TST) versus interferon gamma release assay (IGRA)—in a densely populated high-burden TB area.MethodsWe developed a seven-step framework that can be tailored to individual TB programmes seeking to compare TB infection (TBI) diagnostics to inform decision-making. We present methodology to estimate (1) the prevalence of TBI, (2) true and false positives and negatives for each test, (3) the cost of test administration, (4) the cost of false negatives, (5) the cost of treating all that test positive, (6) the per-test cost incurred due to treatment and misdiagnosis and (7) the threshold at which laboratory infrastructure investments for IGRA are outweighed by system-wide savings incurred due to IGRA utilisation. We then applied this framework in a densely populated, peri-urban district in Lima, Peru with high rates of Bacillus Calmette–Guérin (BCG) vaccination.FindingsThe lower sensitivity of TST compared with IGRA is a major cost driver, leading to health system and societal costs due to misdiagnosis. Additionally, patient and staff productivity costs were greater for TST because it requires two patient visits compared with only one for IGRA testing. When the framework was applied to the Lima setting, we estimate that IGRA-associated benefits outweigh infrastructural costs after performing 672 tests.ConclusionsGiven global shortages of TST and concerns about costs of IGRA testing and laboratory capacity building, this costing framework can provide public health officials and TB programmes guidance for decision-making about TBI testing locally. This framework was designed to be adaptable for use in different settings with available data. Diagnostics that increase accuracy or mitigate time to treatment should be thought of as an investment instead of an expenditure.