Habitat structure has been implicated as a source of bias for pitfall-trap data but most evidence is observational or anecdotal. This study used an experimental approach to quantify biases due to habitat structure. In a randomized block design, I manipulated native grassland to create three types of habitat structure and measured pitfall-trap catches of grassland ants. Small patches of modified habitat were surrounded by otherwise unmodified grassland with the assumption that population density remained unaffected by the modification and that the effects observed were due to changes in trappability. I assessed magnitude, direction, predictability, and consistency of bias for the following types of data: population abundance for single species, relative abundance among species, species composition of assemblages, and species richness. The magnitude of the bias in population abundance was large for most species. However, since the direction of the bias varied predictably with habitat structure, pitfall-trap data can be used to judge differences in population abundance in some situations. The magnitude of the bias in relative abundance was less than for abundance. However, there was inconsistency in the direction and magnitude of bias among species. Thus, interpretation of relative abundance data in pitfall-trap studies may be compromised. Species richness and species composition were biased by habitat structure but were affected significantly only when the groundcover was very dense, suggesting a threshold effect of habitat structure. To help to interpret survey data, pitfall-trap studies should routinely measure attributes of habitat structure and incorporate an experimental component to characterize the bias.