Both hepatitis B (HBV) and C viruses (HCV) are causes of hepatocellular carcinoma (HCC), but lifetime risk and sex difference remain unclear. This study aimed to assess the lifetime risk and sex difference of HCC among patients with chronic HBV and/or HCV. A prospective cohort of 23,820 residents of Taiwan age 30 to 65 years were enrolled from 1991 to 1992, with 477 instances of HCC occurring subsequently. Serum samples collected at enrollment were tested for seromarkers and viral load of HBV and HCV. Newly developed HCC was ascertained through computerized data linkage with national cancer registry and death certification systems. The cumulative lifetime (age 30 to 75 years) incidences of HCC for men and women positive for both HBV surface antigen (HBsAg) and antibodies against HCV (anti-HCV) were 38.35% and 27.40%; for those positive for HBsAg only, 27.38% and 7.99%; for those positive for anti-HCV only, 23.73% and 16.71%; and for those positive for neither, 1.55% and 1.03%, respectively. There was a significant male predominance in incidence of HCC for chronic HBV carriers but not for chronic carriers of HCV or both. Multivariate adjusted hazard ratio of developing HCC decreased with age in HBsAg-seropositive men but increased with age in anti-HCV-seropositive women. Among dual-infected participants, there was an inverse association between HBV and HCV viral load. Risk of HCC increased significantly with increasing viral load of HBV and HCV. There exists a suppressive effect of HCV on HBV viral load. Individual and combined effects of the two viruses on HCC vary with sex and age.