<h2>Abstract</h2><h3>Background</h3> Cisgender women have stronger humoral immune responses than do cisgender men, which partly explains their enhanced responses to infection and vaccination, and the female sex bias in many B-cell driven autoimmune disorders. Oestrogen has been shown to augment class-switch recombination defined as the process whereby B cells switch to IgG, IgA, and IgE isotypes. Murine work suggests that this process occurs via upregulation of the enzyme activation-induced cytidine deaminase, encoded by the <i>AICDA</i> gene, responsible for DNA mutations necessary for class-switch recombination. However, the effect of sex determinants on class-switch recombination remains understudied in humans. We aimed to investigate the effect of sex-chromosomal complement and hormonal milieu on B-cell class-switch recombination. <h3>Methods</h3> This cross-sectional study was done at University College London in the UK. We used an in vivo human model with peripheral blood samples from self-defined healthy cisgender men and women (aged 14–31 years) and healthy transgender men and women (aged 15–19 years) who received treatment with gonadotropin-releasing hormone analogue with or without additional testosterone (for transgender men) or oestradiol (for transgender women). Tanner stage during puberty was determined by a self-reported questionnaire for cisgender participants and by a physician-determined assessment before starting treatment for transgender participants. All participants were defined as Tanner stages 4–5 (after puberty) and had no history of autoimmune disorders, serious infections, or other medical conditions. None received vaccines or immune-modifying treatment 3 weeks before the donation. Peripheral blood mononuclear cell phenotyping was performed using flow cytometry and serum phenotyping was done using a LEGENDplex immunoassay (BioLegend, San Diego, USA). RNA sequencing analysis was done for gene expression. An unpaired t test, Mann-Whitney <i>U</i> tests, or a one-way ANOVA were used for statistical analysis, as appropriate. <h3>Findings</h3> Between July 10, 2015, and July 30, 2021, blood samples were obtained from 153 participants (43 cisgender men, 62 cisgender women, 25 transgender men, and 23 transgender women). RNA sequencing was carried out on samples from 22 additional participants (four cisgender males, six cisgender females, five transgender males, and seven transgender females). None were excluded. The median age of participants was 18·0 years (IQR 17·2–19·3). Cisgender men had significantly lower percentages of class-switched (IgD<sup>–</sup> CD27<sup>+</sup>) B cells than did cisgender women (unpaired <i>t</i> test mean 12·00 <i>vs</i> 16·07, 95% CI –6·65 to –1·47; p=0·0024), specifically pertaining to decreased IgG<sup>+</sup> B cells (mean 10·50 <i>vs</i> 17·16, –10·99 to –2·34; p=0·0094). IgG subclasses 1–3 are implicated in response to infection, whereas IgG4 appears to have immunoregulatory effects. Cisgender men showed a higher IgG4 to IgG1 serum ratio compared with cisgender women (mean 0·15 <i>vs</i> 0·06, 0·03 to 0·15; p=0·0039). Oestrogen blockade on a XX background (gonadotropin-releasing hormone analogue) in transgender men resulted in a reduced proportion of class-switched B cells compared with cisgender women (ANOVA mean 10·13 <i>vs</i> 16·07, 1·45 to 10·42; p=0·0062). The ratio of IgG1 to IgG4 subclasses was unaffected. Oestrogen (oestradiol) treatment on a XY background in transgender women showed no overall effect on class-switching (ANOVA mean 9·55 <i>vs</i> 12·00 in cisgender men, –1·25 to 6·15; p=0·26), but IgG4 to IgG1 ratios decreased significantly (Mann-Whitney <i>U</i> median 0·05 [IQR 0·03 to 0·12] <i>vs</i> 0·15 [0·08 to 0·20]; p=0·015). Preliminary analysis showed that <i>AICDA</i> expression was lower in cisgender men (median 1·66 [1·62 to 1·72] <i>vs</i> 1·85 [1·75 to 1·90] in cisgender women; p=0·038), and oestrogen blockade in transgender men resulted in a non-statistically significant reduction compared with cisgender women (median 1·91 [1·86 to 1·97] <i>vs</i> 2·05 [1·94 to 2·10]; p=0·13). No differences were observed in <i>AICDA</i> expression between transgender women treated with oestrogen and cisgender men (median 1·12 [1·09 to 1·20] <i>vs</i> 1·07 [1·04 to 1·15]; p=0·23). <h3>Interpretation</h3> Oestrogen differentially affects B-cell class-switch recombination depending on the sex chromosome complement. On the XX background, oestrogen was associated with increased class-switch recombination, whereas on the XY background this effect was not seen. Further work is needed to elucidate the molecular mechanisms underlying these observations. <h3>Funding</h3> NIHR UCLH Biomedical Research Centre and Lupus UK.