Not politically correct, but the way I remember it is "Civil Engineers are queer", i. e. C*ΔV=Q, or the the charge stored in the capacitor Q Coulombs = the capacitance C Farads times the change ΔV in Volts as the capacitor is either charged or discharged.
You also need to know that an Ampere of current is a Coulomb of charge per second, I=Q/Δt.
Substituting and rearranging gives:
Q=I*Δt and Q= C*ΔV, so I*Δt=C*ΔV
or C = I*Δt/ΔV
So to only allow a 1V drop (20% if 5V) while delivering 100mA for 4ms, you would need 0.1*0.004/1 = 4e-4 = 400e-6 = 400uF.