Utilizing optimal foraging theory and laboratory estimates of foraging costs, we predict the choice of foods and use of habitats by fish in the field. These predictions are tested with the bluegill sunfish (Lepomis macrochirus) foraging in three habitats (open water, sediments, and vegetation) in a pond. Relations describing prey encounter rates in each habitat as a function of prey size, prey density, and fish size were derived from laboratory experiments. These relations permitted us to estimate prey encounter rates based on weekly prey samples in each habitat of the pond. We can then determined the optimal diet and profitability (net energy return) for each habitat through time. Predictions of optimal diet exhibited good qualitative correspondence to the actual diet of the fish in the open water and vegetation, although we consistently predicted a slightly narrower diet than the fish were choosing. The model correctly predicted the magnitude of the change in size selection on Daphnia pulex with fish size and with decline in prey density. Predictions of optimal diet in the sediments were considerably in error apparently due to a tendency for late—instar midges to burrow deep in the sediments, thereby becoming unavailable to the fish. In this case habitat profitabilities were computed simply on the basis of the actual observed diet. Predictions of optimal habitat use i.e., when the fish should switch habitats to maximize feeding rates, showed striking correspondence to the actual habitat use of the fish; the bluegills switched from feeding in the open water column to feeding from the sediments within a few days of our predictions. The actual habitat use pattern differs dramatically from a null model of random habitat use. We indicate how this approach may be useful in studying intra— and interspecific exploitative interactions.