Teleost fishes have body tissues that are denser than water, causing them to sink. Many teleosts therefore possess a gas-filled swimbladder that provides lift, allowing fish to attain neutral buoyancy. The importance of the swimbladder as a buoyancy aid during changing body sizes over ontogeny and its role in determining the swimming depth of fish remain unclear. In this study, we have used the zebrafish (Danio rerio) to investigate changes in the size and shape of the swimbladder during development and examine whether these changes affect the hydrostatic contribution of the swimbladder during swimming. Our results showed that swim-up behavior is critical for larvae to first inflate their swimbladder, decrease body density, and attain neutral buoyancy. Following inflation, we found a strong linear correlation between fish volume and swimbladder volume over ontogeny. This trend was supported by measures of the density of zebrafish, which was conserved within a narrow range between 1.00 +/- 0.001 and 0.996 +/- 0.001 g/cm(3) despite an increase in the swimming depth of zebrafish, which occurred upon transition to a double-chambered organ. Finally, we demonstrated that the contribution of the swimbladder keeps the fish within 1.7% of neutral buoyancy throughout larval development.