How to Calculate the Voltage of a Charging Capacitor

The formula to calculate the voltage across a charging capacitor is:
where VC is the voltage across the capacitor, VS is the supply voltage that is charging the capacitor, t is the amount of time (in seconds (s)) for which the capacitor has been charging, R is the resistance in of the capacitor circuit, and C is the capacitance of the capacitor.
Example
A 1000µF capacitor is being charged by a 10-volt power source and has been charging for 5 seconds. The resistance in series
with the capacitor is 1KΩ. What is the voltage across the capacitor after this time has elapsed?

So this capacitor will have a voltage of 9.93V after 5 seconds has elapsed.