In this rule

Historical Rules · 1 June 2020

Rule 202.3e

Official source text from the 1 June 2020 Rules release

Permalink

When calculating the converted mana cost of an object with an {X} in its mana cost, X is treated as 0 while the object is not on the stack, and X is treated as the number chosen for it while the object is on the stack.

Find this number in the current Rules