Alexander Fufaev
My name is Alexander FufaeV and here I write about:

RC Circuit: Charging and Discharging a Capacitor

Important Formula

Formula: Charging Capacitor
What do the formula symbols mean?

Capacitor voltage

Voltage across the capacitor (e.g. between the two capacitor plates). When charging the capacitor, this voltage increases exponentially with time \(t\). At the end of the charging process it reaches the value given by the source voltage \( U_0 \).

Source voltage

Source voltage is the constant voltage applied to the capacitor.


Capacitance is a characteristic quantity of the capacitor and tells how many charges must be brought onto the capacitor to charge the capacitor to the voltage \( 1 \, \text{V} \).

Electrical Resistance

Resistor with the value \( R \) connected in series with the capacitor. The resistor has an influence on how fast the capacitor can charge.


After the source voltage \(U_0\) is applied, the capacitor starts to charge. The more time \(t\) has elapsed, the closer the capacitor voltage \( U_{\text C}(t) \) is to the value of the source voltage \(U_0\).
RC Circuit - charging capacitor Hover the image!
Table of contents
  1. Important Formula
  2. What is an RC circuit? Here you will learn how an RC circuit is built and how it works.
  3. Charging a capacitor Hier wird die Formel für die Spannung und Strom am Kondensator hergeleitet und erklärt und zwar während der Kondensator aufgeladen wird.
  4. Discharging a capacitor Here the formula for the voltage and current across the capacitor is derived and explained while the capacitor is discharging.
  5. Exercises with Solutions

RC circuit is a useful component that you will often encounter in electronics. For example, they are used as a so-called low-pass filter, with which you can filter out high frequencies of the applied AC voltage. 'Low pass' basically means that low frequencies are allowed to pass and high frequencies of the AC voltage are blocked. Other applications of an RC circuit include:

  • Generation of a sawtooth-shaped voltage

  • Turn signal lights of a car

  • Artificial pacemaker

What is an RC circuit?

The 'R' stands for a Resistor and the 'C' stands for a Capacitor. So an RC circuit is a simple resistor-capacitor circuit. The resistor and capacitor are connected in series.

RC Circuit: Charging Capacitor
The switch is switched to the left. The capacitor is charged via a resistor.
RC Circuit: Discharging Capacitor
The switch is switched to the right. The capacitor is discharged via a resistor.

In illustration 1 or 2 you can see such an RC circuit. A capacitor connected with a resistor is of course useless without an applied voltage. Therefore the circuit also has a switch which can be switched to the left or to the right to turn off or on the source voltage.

  • When the switch is turned to the left, a constant voltage \(U_0\) is applied to the RC element (illustration 1). An electric current \(I(t)\) (a charging current) starts to flow through the resistor and capacitor. The current decreases over time. On the other hand, the voltage \(U_{\text C}(t)\) on the capacitor, which was zero at the beginning, increases with time until the capacitor is fully charged to the value \(U_0\).

  • If the switch is turned to the right, the capacitor is discharged again via the resistor (illustration 2). The flowing current \(I(t)\) (a discharge current) is maximum at the moment the switch has just been pushed and decreases with time until it becomes zero when the capacitor is completely discharged. The voltage \(U_{\text C}(t)\) across the capacitor also decreases with time.

Charging a capacitor

As soon as the switch is turned to the left, a constant voltage \(U_0\) (source voltage) is immediately applied to the resistor and the capacitor (RC element). This is the total voltage that is continuously applied to the RC element. But, what about the current flowing through the RC element? And, what about the voltage \( U_{\text R} \) across the resistor and the voltage \( U_{\text C} \) across the capacitor individually?

Formulate differential equation for the charging current

To examine these three quantities, we use the Kirchhoff's voltage law (2nd Kirchoff law). According to the Kirchhoff's voltage law, the sum of all signed voltages must be zero. In our case the source voltage \(U_0\) is the total voltage. That means the voltage \( U_{\text R} \) at the resistor and the voltage \( U_{\text C} \) at the capacitor together form the total voltage:

The source voltage \(U_0\) is known because we set it ourselves. The voltages \(U_{\text R}\) and \(U_{\text C}\) on the other hand are not known. Therefore we have to try to represent them in a different way.

According to Ohm's law, we can express the voltage \( U_{\text R} \) at the resistor \(R\) with the help of the current \(I\) flowing through the entire circuit:

For the capacitor having the capacitance \(C\), the charge \(Q\) on its capacitor plates is given by: \(Q = C \, U_{\text C} \). If we rearrange this formula for \( U_{\text C} \) and substitute in 2, we get:

We haven't won much yet, since \(I\) and \(Q\) are also unknown. But now comes the crucial step: We see in the experiment that the current \(I\) is time dependent: \(I(t)\). Thus the charge \(Q\) on the capacitor plates must increase with time. The charge must therefore also be time-dependent in some way: \(Q(t)\). We just don't know how yet! To figure out this time dependence exactly, we need to turn the equation 3 we set up into a differential equation. For this purpose we differentiate the whole equation with respect to time \(t\):

Since the constant voltage \(U_0\) is time independent, its derivative is omitted. The resistance \(R\) is also constant, therefore we may move it before the time derivative. This is also true for the capacitance \(C\). The time derivative of the charge \(Q(t)\) is exactly the definition of the current \(I(t)\):

Let's also divide the whole equation by \(R\) for a more compact representation and put the time derivative to the left side:

We have obtained a homogeneous linear differential equation of 1st order for the current \(I(t)\). If we solve this differential equation, we get how the current \(I(t)\) depends exactly on the time \(t\). For example, we can use the 'separation of variables' solution method from mathematics to solve this differential equation. In addition to the differential equation we need a so-called initial condition to make our solution for the current unique. The current \(I_0\) at time \(t = 0\) corresponded to the value given by our source voltage: \( I_0 ~=~ \frac{U_0}{R} \). And this is our initial condition.

Current during charging

Solving the differential equation 6 together with the associated initial condition, yields a formula for the current \(I(t)\), with \(I_0 ~=~ \frac{U_0}{R}\):

This is the charging current that flows through the resistor and capacitor as soon as we turn the switch to the left, that is apply the voltage \(U_0\) to the RC element. The current decreases exponentially. You can see this directly from the minus sign in the exponential function. If you plot the function \(I(t)\) in a current-time diagram, you will get such a graph:

The charging current decreases exponentially over time during charging.

From the graph we can get the following information about the current:

  • At the time \(t = 0\) (that is at the time of switching on) the current had its maximum value \( I_0 = \frac{U_0}{R} \). We can control this maximum value by choosing a different resistor \(R\) or a different voltage \(U_0\).

  • The current \(I(t)\) decreases exponentially with time to zero. Once the current is practically zero, we expect the capacitor to be fully charged.

If you look at the exponential equation 7 for the current, you will see that the factor \(\frac{1}{RC}\) occurs in the exponent. We call the product \(R\,C\) the time constant. It is so called because it has the unit of time and, because it is a constant, since both \(R\) and \(C\) are constant. For example, we can ask the following question:

What is the current when the time \( t = R\,C\) has passed?

Let's insert this time into the equation 7:

Answer: After the time \( t = R\,C\) the current decreases to 37% of the maximum value \(\frac{U_0}{R}\)

With this time constant \(R\,C\) we can practically experimentally adjust the slope of the exponential function to our needs.

  • If you want the capacitor to take longer to charge, then you must choose the resistance \(R\) or capacitance \(C\) as LARGE as possible, so that the time constant \(R\,C\) also becomes as large as possible. Due to a larger time constant, the exponential function becomes flatter and the current decreases more slowly to zero. The capacitor is therefore charged more slowly.

  • If you want the capacitor to be charged as fast as possible, then you have to choose the resistance \(R\) or capacitance \(C\) as SMALL as possible, so that the time constant \(R\,C\) is as small as possible. Due to a smaller time constant, the exponential function becomes steeper and the current drops to zero faster. The capacitor is therefore charged more quickly.

Example: Current after 0.01 seconds of charging

A source voltage \(U_0 = 1 \, \text{kV}\) is applied to resistor with resistance \(R = 2 \, \text{k}\Omega \) and capacitor of capacitance \( C = 1 \, \mathrm{\mu F} \). What is the charging current after \( t = 0.01 \, \text{s}\)?

The time constant is:

Thus, the charging current after 0.01 seconds is:

Voltage at the capacitor during charging

What about the voltage \( U_{\text C} \) across the capacitor when the capacitor is charged? To answer this question, we just need to use the equation 2 written down earlier for the total voltage:

Here, Ohm's law \( R\, I(t) \) was used for \(U_{\text R}(t)\). Let's rearrange equation 11 for the capacitor voltage and insert the exponential function 7 for the current:

If we now only cancel the resistance \(R\) and factor out the source voltage (U_0\), we get the time-dependent voltage across the capacitor:

We can illustrate the capacitor voltage in a voltage-time diagram:

The voltage across the capacitor increases over time as it charges and reaches a saturation value.

From the graph we can obtain the following information:

  • The capacitor voltage \(U_{\text C}(t)\) increases with time. This means that the applied source voltage \(U_0\) is not immediately present between the capacitor plates.

  • The capacitor voltage \( U_{\text C}(t)\) practically reaches a saturation value at some point, namely the given source voltage \(U_0\). Then the capacitor is fully charged.

Example: Capacitor voltage after 0.01 seconds of charging

A source voltage \(U_0 = 1 \, \text{kV}\) is applied to resistor with resistance \(R = 2 \, \text{k}\Omega \) and capacitor of capacitance \( C = 1 \, \mathrm{\mu F} \). What is the capacitor voltage after \( t = 0.01 \, \text{s}\) of charging?

We have already calculated the time constant in 9: \( R \, C = 0.002 \, \text{s} \). Thus, after 0.01 seconds the capacitor voltage is:

Voltage at the resistor during charging

What about the voltage \(U_{\text R}(t)\) across the resistor while the capacitor is charging? For this we only have to insert the found capacitor voltage 13 into the voltage equation 1:

Rearrange for \(U_{\text R}(t)\) and bracket out \(U_0\):

The voltage across the resistor decreases exponentially with time during charging.

The 1 cancels out and you get:

Charging process summarized
  • During charging, the current \( I(t)\) decreases exponentially from \(I_0 = \frac{U_0}{R}\) to zero.

  • The voltage \( U_{\text R}(t)\) across the resistor decreases exponentially from \(U_0\) to zero.

  • The voltage \( U_{\text C}(t)\) across the capacitor increases from zero to the saturation value \(U_0\) supplied by the source voltage.

Discharging a capacitor

RC Circuit: Discharging Capacitor
The switch is turned to the right. The previously charged capacitor is now discharged.

Now we come to the discharging process. After we have charged the capacitor, we can discharge it again by turning the switch to the right. Then the RC element is basically short-circuited. At the beginning, a discharge current \( I_0 ~=~ \frac{U_0}{R} \) flows in the opposite direction and this decreases exponentially, as during the charging process:

The magnitude of the current \(|I(t)|\) when discharging a capacitor decreases exponentially to zero.

The current \(I(t)\) flows in the opposite direction during discharging to the current during charging. We take this into account with the minus sign in front of \(I_0\). (\(I_0\) is the magnitude of the initial current and is always positive here). Besides that,, the current behaves in the same way when discharging as when charging. Of course, we can omit the minus sign if we are not interested in the fact that the current now flows the other way around.

Voltage at the resistor during discharge of a capacitor decreases from \(-U_0\) to 0.

To get the voltage \(U_{\text R}(t)\) across the resistor, all we have to do, according to Ohm's law, is multiply the equation 18 by the resistance \(R\), because \( U_{\text R}(t) ~=~ R \, I(t)\):

Here is \( U_0 = R \, I_0 \). Also here we have a minus sign. This means that during discharging the polarity of the voltage at the resistor is exactly opposite to the voltage during charging. Otherwise nothing has changed for \(U_{\text R}(t)\): The voltage \(U_{\text R}(t)\) at the resistor decreases exponentially as during charging.

If we use the Kirchhoff's voltage law, then we get an equation for voltages during discharge:

Capacitor voltage during discharge decreases exponentially with time.

If we now insert the voltage \(U_{\text R}(t)\) and rearrange for \(U_{\text C}(t)\), we get:

The difference to the capacitor voltage during the charging process is that the voltage at the beginning, that is at the time \(t = 0\), is not zero but has the value \(U_0\). The capacitor voltage decreases exponentially.

Discharging process summarized
  • During discharging, the current \( I(t)\) (opposite to the current during charging) decreases from the value \(-I_0\) to zero.

  • The voltage \( U_{\text R}(t)\) at the resistor decreases exponentially from the value \(-U_0\) to zero.

  • The voltage \( U_{\text C}(t)\) on the capacitor decreases exponentially from the value \(U_0\) to zero.

Now you know what happens to the voltage and current through the resistor and capacitor in time when the capacitor is charged or discharged.

Exercises with Solutions

Use this formula eBook if you have problems with physics problems.

Exercise #1: Discharging a capacitor from 900V to 10V

RC Circuit - discharging capacitor Hover the image!
Considered circuit for discharging the capacitor.

A capacitor with capacitance \( C = 10 \, \mu\text{F} \) and an unknown series resistance \( R \) is charged to \( U_0 = 900 \, \text{V} \). The aim is to discharge the capacitor from \( 900 \, \text{V} \) to \( 10 \, \text{V} \) within \( 10 \, \text{s} \).

What must be the value of the series resistance \( R \)?

Solution to Exercise #1

Voltage-Time Graph - discharging capacitor
U-t diagram - Discharging of the capacitor.

According to the problem statement, the capacitor is initially charged to \( U_0 = 900 \, \text{V} \). The discharge of the capacitor does not happen abruptly from \( 900 \, \text{V} \) to \( 0 \, \text{V} \), but rather it takes some time. This discharge time depends on the initial voltage \( U_0 \), the capacitance \( C \) of the capacitor, and the series resistance \( R \). The measured voltage \( U_{\text C}(t) \) across the capacitor is therefore time-dependent and follows the following exponential relationship: 1 \[ U_{\text C}(t) ~=~ U_0 \, e^{-\frac{t}{R\,C}} \]

The goal is to discharge the capacitor with capacitance \( C = 10 \, \mu\text{F} \) from \( U_0 = 900 \, \text{V} \) to \( U_{\text C}(t) = 10 \, \text{V} \) within \( t = 10 \, \text{s} \). For this, the resistance \( R \) must be appropriately chosen. So, equation 1 is rearranged for the resistance!

Move \( U_0 \) to the other side of the equation: 2 \[ \frac{U_{\text C}(t)}{U_0} = e^{-\frac{t}{R\,C}} \]

To solve the exponential function, the natural logarithm \( \ln() \) is used on both sides since it is the inverse function of the exponential function: 3 \[ \ln\left(\frac{U_{\text C}(t)}{U_0}\right) = -\frac{t}{R\,C} \]

Now just rearrange for \( R \): 4 \[ R = -\frac{t}{C \, \ln\left(\frac{U_{\text C}(t)}{U_0}\right)} \]

Substituting the given values yields: 5 \[ R = 222 \, \text{k}\Omega \]

Exercise #2: Charge, capacitance and half-life of a capacitor

A capacitor with an unknown capacitance and a discharge resistance \( R = 2 \, \mathrm{k\Omega} \) was charged to \( 50 \, \mathrm{V} \) and discharged to \( 15 \, \mathrm{V} \) within one millisecond.

  1. What is the capacitance \( C \) of the capacitor?
  2. What is the time constant of the capacitor?
  3. After what time \( t_{\mathrm h} \) have \( 50 \, \mathrm{V} \) fallen to half?
  4. How much charge \( Q \) did the capacitor carry before the discharge process?

Solution to Subtask #2.1

To find the capacitance \( C \) of the capacitor, we use the formula that describes the temporal evolution of the voltage across the capacitor during the discharge process: $$U_{\text C}(t) ~=~ U_0 \, \mathrm{e}^{-\frac{t}{R\,C} }$$

We are looking for capacitance, so we rearrange 1 for \( C \): $$C ~=~ - \frac{t}{ R \, \ln(\frac{U_{\mathrm C}}{ U_0 }) }$$

The voltage \( U_{\mathrm C}(1\,\mathrm{ms}) = 15 \, \mathrm{V} \) after \( t = 1 \,\mathrm{ms} \) is given. The initial voltage \( U_0 = 50 \, \mathrm{V} \) and the discharge resistance \( R = 2000 \mathrm{\Omega} \) in series are also known. Substituting the specific values yields the desired capacitance: $$\begin{align}C &~=~ - \frac{ 10^{-3} \, \mathrm{s} }{ 2000 \, \mathrm{\Omega} ~\cdot~ \ln\left(\frac{ 15 \, \mathrm{V} }{ 50 \, \mathrm{V} }\right) } \\\\ &~=~ 4.15 \cdot 10^{-7} \, \mathrm{F} \\\\ &~=~ 415 \, \mathrm{nF}\end{align}$$

Solution to Subtask #2.2

The time constant \( \tau \) is given by: $$\tau ~=~ R \, C$$

It describes the time after which the initial voltage has fallen to approximately 37%. Substituting the discharge resistance and the capacitance found in a) gives: $$\begin{align}\tau &~=~ 2000 \, \mathrm{\Omega} ~\cdot~ 4.15 \cdot 10^{-7} \, \mathrm{F} \\\\ &~=~ 8.3 \cdot 10^{-4} \, \mathrm{s} \\\\ &~=~ 0.83 \, \mathrm{ms}\end{align}$$

Solution to Subtask #2.3

In this subtask, we want to calculate the half-life \( t_{\mathrm h} \) of the capacitor. The half-life indicates after what time the initial voltage of \( U_0 = 50 \, \mathrm{V} \) has fallen to half, that is, to \( U_{\mathrm C} = \frac{U_0}{2} = 25 \, \mathrm{V} \): $$\frac{U_0}{2} ~=~ U_0 \, \mathrm{e}^{-\frac{ t_{\mathrm h} }{R\,C} }$$

To solve for the half-life \( t_{\mathrm h} \), we get: $$t_{\mathrm h} ~=~ R \, C \, \ln(2)$$

As you can see, the half-life is determined by the time constant \( R \, C \), which is simply multiplied by \( \ln(2) \). So, we can simply use the time constant calculated in b) for the half-life: $$\begin{align}t_{\mathrm h} &~=~ \tau \, \ln(2) \\\\ &~=~ 8.3 \cdot 10^{-4} \, \mathrm{s} ~\cdot~ \ln(2) \\\\ &~=~ 5.75 \cdot 10^{-4} \, \mathrm{s} \\\\ &~=~ 0.575 \, \mathrm{ms}\end{align}$$

Solution to Subtask #2.4

Here, we want to find out how much charge \( Q_0 \) was on the capacitor before the capacitor was discharged. So, we are looking for capacitor charge at the initial time \(t = 0\). For this, we use the relationship between voltage and charge on the capacitor: $$Q_0 ~=~ C \, U_0$$

Here, we need the initial voltage \( U_0 \), since this was applied at the initial time \(t = 0\). Substituting the values yields: $$\begin{align}Q_0 &~=~ 4.15 \cdot 10^{-7} \, \mathrm{F} ~\cdot~ 50 \, \mathrm{V} \\\\ &~=~ 2.08 \cdot 10^{-5} \, \mathrm{C} \\\\ &~=~ 20.8 \, \mathrm{\mu C}\end{align}$$