We studied the effect of informing physicians of the charges for outpatient diagnostic tests on their ordering of such tests in an academic primary care medical practice. All tests were ordered at microcomputer workstations by 121 physicians. For half (the intervention group), the charge for the test being ordered and the total charge for tests for that patient on that day were displayed on the computer screen. The remaining physicians (control group) also used the computers but received no message about charges. The primary outcomes measured were the number of tests ordered and the charges for tests per patient visit. In the 14 weeks before the study, the number of tests ordered and the average charge for tests per patient visit were similar for the intervention and control groups. During the 26-week intervention period, the physicians in the intervention group ordered 14 percent fewer tests per patient visit than did those in the control group (P less than 0.005), and the charges for tests were 13 percent ($6.68 per visit) lower (P less than 0.05). The differences were greater for scheduled visits (17 percent fewer tests and 15 percent lower charges for the intervention group; P less than 0.01) than for unscheduled (urgent) visits (11 percent fewer tests and 10 percent lower charges; P greater than 0.3). During the 19 weeks after the intervention ended, the number of tests ordered by the physicians in the intervention group was only 7.7 percent lower than the number ordered by the physicians in the control group, and the charges for tests were only 3.5 percent lower (P greater than 0.3). Three measures of possible adverse outcomes--number of hospitalizations, emergency room visits, and outpatient visits during the study period and the following six months--were similar for the patients seen by the physicians in both groups. We conclude that displaying the charges for diagnostic tests significantly reduced the number and cost of tests ordered, especially for patients with scheduled visits. The effects of this intervention did not persist after it was discontinued.