This post gives is a quick derivation of the formula for calculating the steady state reactive power absorbed by a capacitor when excited by a sinusoidal voltage source.
Given a capacitor with a capacitance value of C in Farads, excited by a voltage source V in volts, it will draw a current i amps into its positive terminal. If V is a steady state sinusoidal source with frequency of ω=2πf , then we may use a Laplace Transform to solve the circuit in the frequency domain where V is the phasor rms voltage, I is the phasor rms current, and Zc is the capacitive reactance in ohms of the capacitor as follows:
Note that the negative sign means that the capacitor is absorbing negative reactive power VARs which is equivalent to stating that the capacitor is supplying reactive power to the external circuit or system. For a three-phase system, multiply Q by 3 to get the total reactive power supplied by the Capacitor.