Humoral immune responses are sexually dimorphic. Female individuals generally exhibit more-robust antibody responses to vaccines and, in the clinical setting as well as in experimental models, are more likely than male individuals to produce autoreactive antibodies of pathogenic potential. A number of differences between the sexes might account for these observations, including differences in the dosage of specific X-chromosome and Y-chromosomal genes, increased exposure of female individuals to antigenic stimulation in childbearing, and differences in circulating concentrations of gonadal steroid hormones. The role of gonadal steroids in modulating such humoral immune responses has been studied for nearly a century, but advances in our knowledge of B-lymphocyte development and function, the mechanisms of immune tolerance, and the molecular basis of gonadal steroid hormone action are now yielding new understanding of the influence of gonadal steroid hormones on the humoral immune system. This Review examines how oestrogens and androgens modulate B-lymphocyte development and function, focusing on the areas of B-cell production in the bone marrow, the maintenance of immune tolerance for self antigens, and the processes of immunoglobulin heavy chain gene somatic hypermutation and class switch recombination during maturation of cells involved in humoral immune responses.