LED resistor calculator

An LED needs a current limit. The resistor drops the difference between the supply and the LED forward voltage.

V
V

Red 1.8 to 2.2; green 2.0 to 3.0; blue and white 2.8 to 3.6.

mA
Series resistor
145.00ohm
= Exact LED series resistor
Power dissipated in the resistor
0.058
Voltage across the resistor
2.900 V
Power in the LEDs
0.042
Share of power reaching the LEDs
42.00 %
Supply is high enough
1
Show the working
  1. Supply voltage = 5
  2. LED forward voltage = 2.1
  3. Desired current = 20
  4. LEDs in series = 1
  5. total_vf = 2.1 * 1 = 2.1
  6. Voltage across the resistor = 5 - 2.1 = 2.9
  7. i_a = 20 / 1000 = 0.02
  8. Series resistor = 2.9 > 0 ? 2.9 / 0.02 : 0 = 145
  9. Power dissipated in the resistor = 2.9 * 0.02 = 0.058
  10. Power in the LEDs = 2.1 * 0.02 = 0.042
  11. Share of power reaching the LEDs = 5 > 0 ? 2.1/5*100 : 0 = 42
  12. Supply is high enough = 2.9 > 0 ? 1 : 0 = 1

Values are shown to six significant figures here; the arithmetic itself runs on exact fractions and is only rounded where a number is printed.

Scenarios & local history

Compare a saved scenario

Recent calculations

    The formula

    • R = (Vsupply - n x Vf) / I
    • P = (Vsupply - n x Vf) x I

    Choose the next resistor value above the calculated one: a slightly lower current is safe, a higher one is not.

    A resistor is a wasteful way to drive high-power LEDs. Above a watt or so, use a constant-current driver.

    Related calculators

    Settings

    Theme

    System follows your operating system and changes with it.

    Text size
    High contrast

    Maximises text and border contrast and removes the grid background.

    Graph-paper background

    Round to
    Notation
    Thousands separators
    Decimal mark
    Nearest fraction

    Shows the result as the nearest tape-measure fraction, with the error it costs.


    Accessibility & interaction
    Reduce motion Stops interface animations even when the operating system does not.
    Underline links Keeps links visually distinct without relying on colour.
    Larger touch targets Makes buttons and form controls easier to tap.
    Shorter reading lines Limits article width for easier scanning.
    Monochrome display Removes colour as an information cue.
    Always-visible focus Makes the keyboard focus ring persistent and stronger.
    Verbose screen-reader results Announces the complete conversion equation.
    Sticky action bars Keeps converter and calculator actions within reach.
    Select values on focus Replaces a value immediately when you start typing.
    Left-handed mobile layout Moves key mobile actions toward the left thumb.

    Your data

    Settings, recent conversions and favourites live in this browser only. Nothing is sent anywhere.

    Offline library