How an LED current-limiting resistor works
The resistor drops the supply voltage left over after the LED’s forward voltage. Dividing that voltage by your target current gives the ideal resistance. This calculator rounds upward to an E24 preferred value, then calculates the current and power with the selected resistor.
Use the LED datasheet’s forward voltage at the intended current. D1 uses a fixed forward-drop diode approximation, with 1 mΩ on resistance in the simulator. It does not model an LED’s full nonlinear curve, temperature dependence or brightness. Account for supply variation, forward-voltage variation and resistor tolerance when choosing real parts.
Edit the component values on the canvas, or choose Try in CircuitSim to simulate your circuit.