A software program is described which will enable laboratory managers to calculate, for their laboratory over a 12 month period, the cost of each test or investigation and of components of that cost. These comprise the costs of direct labour, consumables, equipment maintenance and depreciation; allocated costs of intermediate operations--for example, specimen procurement, reception, and data processing; and apportioned indirect costs such as senior staff time as well as external overheads such as telephone charges, rent, and rates. Total annual expenditure on each type of test is also calculated. The principles on which the program is based are discussed. Considered in particular, are the problems of apportioning indirect costs (which are considerable in clinical laboratory work) over different test costs, and the merits of different ways of estimating the amount or fraction of staff members' time spent on each kind of test. The computer program is Crown copyright but is available under licence from one of us (JAS).