The detectability of low-contrast lesions in medical images can be affected significantly by the choice of grayscale window width and level (W/L) for electronic display. Our objective was to measure the effects of various W/L conditions on lesion detectability in simulated and real mammographic images, and then correlate observer performance with predictions of detection thresholds derived from a visual discrimination model (VDM). In the first experiment, detection thresholds were measured in 2AFC trials for five W/L conditions applied to simulated mammographic backgrounds and lesions (i.e., Gaussian "masses" and blurred-disk "microcalcification clusters") using nonmedical observers. In the second experiment, the detectability of real microcalcification clusters in digitized mammograms was evaluated for three W/L conditions in an ROC observer study with mammographers. For the simulated images, there was generally good agreement between model and experimental thresholds and their variations across W/L conditions. Both experimental and model results showed significant reductions in thresholds when W/L processing was applied locally near the lesion. ROC results with digitized mammograms read by radiologists, however, failed to show enhanced detection of microcalcifications using a localized W/L frame, probably due to the nonuniform appearance of parenchymal tissue across the image.