Diffusion capacitance is the capacitance because of transport of charge carriers among the two terminals of a device, for instance, the diffusion of carriers from anode to cathode in forward bias mode of a diode or from emitter to base (forward-biased junction in active region) for a transistor. In a semiconductor device along with a current flowing via it (for instance, an ongoing transport of charge by diffusion) at a specific moment there is essentially a number of charge in the procedure of transit via the device. If the applied voltage modifies to a different value and the current changes to a different value, a different amount of charge will be in transit in the new situations. The change in the amount of transiting charge divided by the change in the voltage that causing it is the diffusion capacitance. The adjective "diffusion" is employed because the original make use of this term was for junction diodes, in which the charge transport was through the diffusion mechanism.
To execute this notion quantitatively, at a specific moment in time let the voltage across the device be V. at present assume that the voltage changes with time slowly enough that at each moment the current is similar like the DC current that would flow at that voltage, say I = I(V) (the quasi static approximation). Assume further that the time to cross the device is the forward transit time TF. In this case the amount of charge in transit via the device at this specific moment, denoted Q, is given by
Q = I (V) τF.
Accordingly, the corresponding diffusion capacitance: Cdiff is
Cdiff = dQ /dV = (dI(V) / dV) TF
In the event the quasi-static approximation does not hold, i.e. for extremely fast voltage changes occurring in times shorter than the transit time τF, the equations governing time-dependent transport in the device have to be solved to find the charge in transit, for instance the Boltzmann equation.