The 2016 World Health Assembly endorsed the elimination of hepatitis B virus (HBV) infection as a public health threat by 2030; existing therapies and prophylaxis measures make such elimination feasible, even in the absence of a virological cure. We aimed to estimate the national, regional, and global prevalence of HBV in the general population and among children aged 5 years and younger, as well as the rates of diagnosis, treatment, prophylaxis, and the future burden globally. In this modelling study, we used a Delphi process with data from literature reviews and interviews with country experts to quantify the prevalence, diagnosis, treatment, and prevention measures for HBV infection. The PRoGReSs Model, a dynamic Markov model, was used to estimate the country, regional, and global prevalence of HBV infection in 2022, and the effects of treatment and prevention on disease burden. The future incidence of morbidity and mortality in the absence of additional interventions was also estimated at the global level. We developed models for 170 countries which resulted in an estimated global prevalence of HBV infection in 2022 of 3·2% (95% uncertainty interval 2·7-4·0), corresponding to 257·5 million (216·6-316·4) individuals positive for HBsAg. Of these individuals, 36·0 million were diagnosed, and only 6·8 million of the estimated 83·3 million eligible for treatment were on treatment. The prevalence among children aged 5 years or younger was estimated to be 0·7% (0·6-1·0), corresponding to 5·6 million (4·5-7·8) children with HBV infection. Based on the most recent data, 85% of infants received three-dose HBV vaccination before 1 year of age, 46% had received a timely birth dose of vaccine, and 14% received hepatitis B immunoglobulin along with the full vaccination regimen. 3% of mothers with a high HBV viral load received antiviral treatment to reduce mother-to-child transmission. As 2030 approaches, the elimination targets remain out of reach for many countries under the current frameworks. Although prevention measures have had the most success, there is a need to increase these efforts and to increase diagnosis and treatment to work towards the elimination goals. John C Martin Foundation, Gilead Sciences, and EndHep2030.