The introduction of artemisinin-based combination therapy in sub-Saharan Africa has prompted calls for increased use of parasitologic diagnosis for malaria. We evaluated the cost-effectiveness of rapid diagnostic tests (RDTs) in comparison to microscopy in guiding treatment of non-severe febrile illness at varying levels of malaria endemicity using data on test accuracy and costs collected as part of a Tanzanian trial. If prescribers complied with current guidelines, microscopy would give rise to lower average costs per patient correctly treated than RDTs in areas of both high and low transmission. RDT introduction would result in an additional 2.3% and 9.4% of patients correctly treated, at an incremental cost of $25 and $7 in the low and high transmission settings, respectively. Cost-effectiveness would be worse if prescribers do not comply with test results. The cost of this additional benefit may be higher than many countries can afford without external assistance or lower RDT prices.