Background/Aims The majority of non-invasive markers of liver fibrosis have been developed in patients with chronic hepatitis C. We aimed to develop a formula for predicting significant fibrosis in patients with chronic viral hepatitis and to compare the usefulness of published models derived from the data obtained from patients with chronic hepatitis C. Methods Serum markers and the METAVIR stage of fibrosis in liver biopsy specimens were compared prospectively in patients with chronic hepatitis B and C (estimation set, 367; validation set, 159). Results In the estimation set, multiple forward stepwise logistic regression analysis identified c-glutamyl transpeptidase, haptoglobin, a2-macroglobulin, matrix metalloproteinase-2, and tissue inhibitor of metalloproteinase-1 as independent predictors of significant fibrosis. A formula termed the SF index was constructed with the aforementioned five variables. The areas under the receiver operating characteristic curves of the SF index for predicting significant fibrosis were 0.828, 0.776, and 0.827 in the estimation, validation, and total sets, respectively. Using cut-off scores of 2.2 and 3.3, significant fibrosis was predicted with considerable accuracy. The diagnostic performances of the SF index and the Zeng index derived from chronic hepatitis B patients were much better than indices derived from chronic hepatitis C patients, such as the APRI, Forns index, and FIB-4. Conclusions We developed a novel formula for predicting significant fibrosis in patients with chronic viral hepatitis. Serum indices from studies in patients with chronic hepatitis C were less accurate in patients with chronic hepatitis B for predicting significant fibrosis.