The calculation of QALY involves two main components: the duration of time and the quality of life during that time. The quality of life is measured on a scale from 0 to 1, where 0 represents death and 1 represents perfect health. The formula used is:
QALY = (Quality of Life) x (Time in Years)
For example, if a treatment provides 0.5 quality of life for 2 years, the QALY would be 0.5 * 2 = 1 QALY.