The same stored energy is computed from capacitance or from charge. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
Use capacitance and voltage
The first route uses capacitance 2 farads and voltage 6 volts.
U=21CV2
Use charge and voltage
The same capacitor also has charge 12 coulombs.
U=21QV
Both routes agree
Both exact routes give 36 joules.
U=36J=36J
Several exact rows close both routes
Every row first computes charge from capacitance and voltage, then gives the same stored energy by either route. The checked diagram is the middle row.