<-- Return to Excel Statistics Page
Calculate Capacitor Charge and Discharge in Excel
Keith Greiner
August, 2020
This essay is about the calculations for charging and discharging a capacitor. A capacitor is an important part of any electronic circuit. It consists of two parallel conductive surfaces. When a voltage is applied, it charges up to almost the amount of the voltage applied, and when the voltage is removed, and circuit connected, it discharges to zero. The Excel images, below, show how to calculate a distribution of the charge and discharge amounts given a selection of times. If you copy and paste the examples into an Excel spreadsheet, and enter the Excel code that is shown in column F (but put the code into the appropriate column for operation) you can plot the charge and discharge rates. After you know the rates, you can apply that knowledge to selection of a capacitor and or resister for the application at hand. I am using the information to create a 5 volt DC supply voltage for electronic projects.
The charge and discharge rates are nonlinear, and are described by the formulae shown below.
Charging
VC = VS(1-e^(-t/RC))
Discharging
VC = VS(e^(-t/RC))
Where:
VC = Voltage across the capacitor
VS = The source voltage
e = 2.71828
t = Time
R = Resistance in ohms
C = Capacitance in farads.
RC is R*C
^ is the power operator
Charging
The circuit for charging, looks like this:
The relationship between charge and time, looks like the following:
The formula is implemented in Excel as shown below.
Discharging
The circuit for discharging looks like this.
The relationship between discharge and time, looks like the following:
The formula is implemented in Excel as shown below.