How we calculate FIB-4 and QRISK3

Last updated: October 26, 2026

GP Automate works out both scores automatically when a relevant lab result arrives, using values already in the patient's record. This article sets out the formula, where each value comes from, and what happens when something is missing.

FIB-4: liver fibrosis risk

FIB-4 is calculated when an AST result arrives. We use the standard published FIB-4 index. The score is written to the patient's record with the result.

FIB-4 = (Age × AST) / (Platelets × √ALT)

  • Age in whole years on the day of calculation.

  • AST and ALT in U/L.

  • Platelets in ×10⁹/L.

Where each value comes from

Value

Taken from

Sample SNOMED CT code

Age

Date of birth

Not applicable

AST

Aspartate aminotransferase result

1000881000000102

ALT

Alanine aminotransferase result

1018251000000107

Platelets

Platelet count

1022651000000100

Which result we use

  • The value on the incoming lab report, if it is there.

  • Otherwise, the most recent value in the patient's history. There is no date limit on this at present, so AST, ALT and platelets can come from different blood draws. We are reviewing whether to add a time limit.

  • IU/L is read as U/L. A result in a different unit is converted where possible.

When we do not calculate FIB-4

  • There is no date of birth on the record.

  • AST, ALT or platelets cannot be found.

  • ALT or platelets is zero or below.

  • A result is in a unit we cannot convert reliably.

How the score is read

Default cut-offs are age-adjusted, in line with NICE guidance. Your practice can set its own cut-offs in the portal.

Age

Low risk

Indeterminate

High risk

Under 65

Below 1.3

1.3 to 2.67

Above 2.67

65 and over

Below 2.0

2.0 to 2.67

Above 2.67

QRISK3: 10-year risk of heart attack or stroke

QRISK3 is calculated when a cholesterol result arrives. We use the published QRISK3-2017 algorithm from qrisk.org. These are the same equations as the online calculator. The difference is that we fill in the inputs from the patient's record instead of someone typing them in.

We only calculate QRISK3 when the patient's sex is recorded as male or female and they are aged 25 to 84. Outside that range, or with no date of birth, no score is produced.

Where each input comes from

Input

Taken from

If it is missing

Sex and age

Patient demographics

Not calculated

Ethnicity

Most recent coded ethnicity

White or not stated, with a note

Smoking

Most recent smoking code. Where cigarettes per day are recorded, under 10 is light, 10 to 19 is moderate and 20 or more is heavy.

Non-smoker. A note is added if the latest code is over 5 years old.

Cholesterol/HDL ratio

Latest total cholesterol divided by latest HDL

Population average, with a note

Systolic BP

Latest systolic reading

Population average, with a note

BP variability

Standard deviation of systolic readings over the last 5 years (needs 2 or more readings)

Population average

BMI

Calculated from latest height and weight. If either is absent, a coded BMI is used.

Population average, with a note

Deprivation

Townsend score, from the patient's postcode

Population average, with a note

Family history

Coded family history of heart disease

No. A general family history code counts as yes, with a note.

Diabetes

Coded type 1 or type 2 diabetes

None

Conditions

Coded atrial fibrillation, rheumatoid arthritis, lupus, CKD stage 3 to 5, migraine, severe mental illness, erectile dysfunction (men, diagnosis or treatment)

No

Medication

Active blood pressure treatment, atypical antipsychotics, regular steroid tablets

No

What "population average" means

It is the QRISK3 average for the patient's sex. It is what the online calculator assumes when an input is left blank, so it neither raises nor lowers the score.

Values we ignore

Readings outside a plausible range are skipped and the next most recent reading is used.

Input

Plausible range

Systolic BP

60 to 250 mmHg

Height

100 to 250 cm

Weight

25 to 300 kg

BMI

10 to 70

Cholesterol/HDL ratio

1 to 20

Estimated inputs

Whenever we estimate an input, a note goes with the score so the clinician can see it. For example: "Systolic BP not identified for this QRISK %". These notes are shown alongside the score in the practice portal.

To check a score, enter the same values at qrisk.org. The result should match.

Disclaimer. Our calculator reproduces the open-source ORISK3-2017 algorithm published by ClinRisk, adapted for use in lab reporting automation. It gives robust risk estimates, but a score may differ slightly from the online calculator at qrisk.org because: (I) BP variability may differ slightly frorn the value used online: and (21 deprivation uses GP Automate's Townsend score lookup, which may vary slightly from the online calculators. The score supports clinical judgement and does not replace it

Questions

If you have a question about a specific score, raise a support ticket and we will check the inputs used.