Calculate current through a diode using the Shockley diode equation. Supports both direct diode voltage input and series resistor circuit analysis. Visualize the I-V curve and load line.
The current–voltage relationship of a p‑n junction diode is described by the Shockley equation, derived by William Shockley in 1949. It forms the foundation of semiconductor device modeling.
I = Is (eVd/(nVT) - 1)
where:
In forward bias (Vd > 0), the exponential term dominates, and current rises rapidly. In reverse bias (Vd < 0), the exponential term becomes negligible, leaving I ≈ –Is – a small leakage current. The equation does not model breakdown (Zener or avalanche), which occurs at high reverse voltages.
The ideality factor n accounts for non‑ideal effects such as carrier recombination in the space‑charge region. For most discrete silicon diodes, n lies between 1.5 and 2.0 at low currents, decreasing toward 1.0 at higher currents. LEDs often have n > 2 due to additional resistive and radiative recombination processes.
When a diode is connected in series with a resistor R and a voltage source Vs, the circuit equation becomes:
I = Is (e(Vs - I·R)/(nVT) - 1)
This is a transcendental equation solved numerically (Newton‑Raphson). The intersection of the diode I‑V curve and the load line (I = (Vs – V)/R) gives the operating point (Q‑point).
A red LED with Is = 1×10⁻¹⁸ A, n = 2.5 typically requires 20 mA at about 1.8 V. To drive it from a 5 V supply, a series resistor is needed. Using the calculator with Vs = 5 V, R = 160 Ω yields I ≈ 20 mA, Vd ≈ 1.8 V – exactly matching the design. The graph shows the load line crossing the I‑V curve at that point.
The calculator has been tested against known diode characteristics (1N4148, 1N4007) and agrees within a few percent for currents between 1 µA and 100 mA. For extreme currents (>1 A) or temperatures, the simplified model may lose accuracy; use manufacturer SPICE models for precise design.