Cost-Effectiveness with QALY

Over the last two decades, QALYs have become increasingly widely used as a measure of health outcomes. The QALY (Quality Adjusted Life Years) combines changes in morbidity (quality) and mortality (amount) in a single indicator.  

Theory and Reference

The idea of a QALY is in fact similar to a complex number, as it is made up of a real part (Length of Life) and an imaginary part (Utility), in the sense that utilities are intangible and not susceptible to direct observation. Therefore, the magnitude of the QALY cannot be calculated by multiplying both components but by determining the modulus of such complex composition. Thus, the QALY must be calculated as the square root of (length of life2 + utility2).

QALY formula written as the square root of (1 squared plus Utility squared), divided by 1.4142, then multiplied by Time.

The detailed analysis of this formula can be found in the following reference: Problems and solutions in calculating quality-adjusted life years (QALYs)

But, you can also use the more traditional formula for QALY as

Traditional QALY formula written as Utility multiplied by Time, the simpler alternative used in many decision tree analyses.



QALY calculation in the SpiceLogic Decision Tree software

In the SpiceLogic Decision Tree software, you can configure an effectiveness payoff in terms of QALY. If you choose QALY, you can choose one of the two formulas as shown here.

QALY formula selector in the Effectiveness criterion editor, offering both the complex-number formula and the Utility times Time formula.


If you choose QALY as effectiveness, you will see two input fields in the Decision Tree payoff editor as shown below.

Payoff editor configured for QALY, with separate input fields for Utility value and Time so the program computes the QALY automatically.


But, if you want to use a direct QALY number without entering Utility and Time, or if you want to use any other single straightforward variable, then in the Effectiveness editor, choose this 3rd option "A single custom variable".

Then, you can define your variable's name, Minimum and Maximum boundary.


Effectiveness Criterion tab with A single custom variable selected, configured here as Maximize Life-years ranging from 0 to 100.

Let's say, you want to enter the QALY number directly and you want to define the range of QALY as a number between 0 and 1. Define it like this.


Custom variable definition for direct QALY entry with name set and range bounded between 0 and 1.

Then, in your Decision Tree, you will be able to enter the QALY value as a direct number as shown below.

Payoff editor on a decision tree node accepting a direct QALY value when the single custom variable option was chosen.


Worked out example

Assume that you have a treatments option that will give you 4 years of life with a utility value of 0.7. Another option will give 7 years of life with a utility value of 0.4. 

⇒ Which option is better?


Start the Decision Tree software and create 2 action nodes like this.

Two-action decision tree (treatment comparison) with the payoff button highlighted to start the QALY worked example.

Then when this window shows up, choose the second button "Cost-Effectiveness Analysis".

Payoff type window with the second button Cost-Effectiveness Analysis selected to configure QALY-based effectiveness.

Then, choose the first radial box "Maximize QALY" and select the formula as shown here.

Cost-Effectiveness criterion editor with Maximize QALY chosen and the square-root-of-(1 + Utility squared) over 1.4142 times Time formula selected.

Then, click proceed, you will be taken to the decision tree and now you will be able to enter the Utility Value and Time. For the first option, set Utility value = 0.7 and Time = 4 years. For the second option, set Utility value = 0.4 and Time = 7 years.

Notice that the QALY is calculated based on the chosen formula and displayed.

Treatment A payoff editor showing Utility 0.7 and Time 4 Years with computed QALY of 3.45 on the tree, alongside the Cost-Effectiveness Plane recommending Treatment B (QALY 5.33).


Last updated on Jan 7, 2026