The discriminant of a quadratic equation in the form ax^2 + bx + c = 0 is calculated using the formula D = b^2 - 4ac. For the equation x^2 - 4x + a = 0, the coefficients are a = 1, b = -4, and c = a. Substituting these values gives the discriminant as (-4)^2 - 4(1)(a), which simplifies exactly to 16 - 4a.