How to calculate capacitor bank value to maintain unity power factor with some suitable example?

KVAR= KW(TAN(COS(-1)#e)- TAN(COS(-1)#d) )

#e= EXISTING P.F.
#d= DESIRED P.F.