To determine the time to appearance of antibody against hepatitis B surface antigen (anti-HBs) after clearance of hepatitis B surface antigen (HBsAg) in chronically infected individuals, we followed up 3963 cases with positive antibody against hepatitis B e antigen (anti-HBe) from 1991 to 2014. Of these, 101 (67 males, 34 females) lost HBsAg. These serocleared cases were checked every 6-month interval regarding HBsAg, anti-HBs, liver function tests, and liver sonography. Hepatitis B virus DNA was assessed at the time of seroclearance or the appearance of anti-HBs. The mean age of these patients at entry to this study was 34·4 ± 13 years. The mean follow-up duration until seroclearance of HBsAg was 6·6 ± 4·3 years. After the mean follow-up of 43·7 ± 45 months, anti-HBs appeared in 64 (63·4%) cases. The cumulative probabilities of anti-HBs appearance for 2, 5 and 10 years were 24·3%, 58% and 78·2%, respectively. The appearance of anti-HBs was associated with age ⩾35 years and seroclearance of HBsAg (hazard ratio 1·96, 95% confidence interval 1·32–3·38, P = 0·016) but not with sex. The results show that anti-HBs may develop in 78·2% of cases within 10 years of HBsAg clearance. Age ⩾35 years at HBsAg loss was associated with earlier development of anti-HBs.