The human adaptive immune system must generate extraordinary diversity to be able to respond to all possible pathogens. The T-cell repertoire derives this high diversity through somatic recombination of the T-cell receptor (TCR) locus, a random process that results in repertoires that are largely private to each individual. However, factors such as thymic selection and T-cell proliferation upon antigen exposure can affect TCR sharing among individuals. By immunosequencing the TCRβ variable region of 426 healthy individuals, we find that, on average, fewer than 1% of TCRβ clones are shared between individuals, consistent with largely private TCRβ repertoires. However, we detect a significant correlation between increased HLA allele sharing and increased number of shared TCRβ clones, with each additional shared HLA allele contributing to an increase in ~0.01% of the total shared TCRβ clones, supporting a key role for HLA type in shaping the immune repertoire. Surprisingly, we find that shared antigen exposure to CMV leads to fewer shared TCRβ clones, even after controlling for HLA, indicative of a largely private response to major viral antigenic exposure. Consistent with this hypothesis, we find that increased age is correlated with decreased overall TCRβ clone sharing, indicating that the pattern of private TCRβ clonal expansion is a general feature of the T-cell response to other infectious antigens as well. However, increased age also correlates with increased sharing among the lowest frequency clones, consistent with decreased repertoire diversity in older individuals. Together, all of these factors contribute to shaping the TCRβ repertoire, and understanding their interplay has important implications for the use of T cells for therapeutics and diagnostics.