LED Resistor Calculator

Every LED needs a series current-limiting resistor to prevent it from drawing too much current and burning out. This calculator works out the correct resistor value from three simple inputs: the supply voltage, the forward voltage of the LED, and the current you want the LED to draw. The result is both the exact calculated resistance and the nearest E24 standard resistor value from your component bin, plus the power the resistor will dissipate. The formula is straightforward. An LED is not a simple resistor; it has a characteristic forward voltage, below which almost no current flows and above which current rises steeply. The resistor sits in series with the LED to absorb the difference between the supply voltage and the LED forward voltage, limiting the current to a safe level. If the supply is 5 V and the LED forward voltage is 2.1 V, then 2.9 V must be dropped across the resistor. At a desired current of 20 mA (0.020 A), the required resistance is 2.9 / 0.020 = 145 ohms. The nearest E24 value is 150 ohms, which gives a slightly lower current of about 19.3 mA, well within the LED's safe operating range. The power dissipated in the resistor is 2.9 x 0.020 = 0.058 W, so a standard quarter-watt (250 mW) resistor is more than adequate. Common LED forward voltages are around 1.8 V to 2.2 V for red and yellow, 2.8 V to 3.5 V for green and blue, and similar for white LEDs. The 5 V supply used in the default is typical of a USB port, Arduino or Raspberry Pi GPIO pin used in NZ maker and hobbyist projects.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner: Premium Homes
V
V
mA
145 Ω
calculated resistance
Nearest E24 value150 Ω
Actual current with E2419.3 mA
Resistor power58.0 mW
Voltage across resistor2.9 V

Always use a resistor with a power rating at least twice the calculated dissipation. Standard 1/4 W (250 mW) resistors suit most low-power LED circuits.

How it works

The voltage across the resistor is Vr = Vsupply minus Vled. The required resistance is R = Vr / I, where I is the desired current in amperes (milliamps divided by 1000). The nearest E24 standard value is found by computing E24 = 10^(round(24 x log10(R)) / 24) and selecting the closest value from the E24 series. The actual current with the E24 resistor is Ia = Vr / E24. Power in the resistor is P = Vr x I (exact) or Vr x Ia (with standard resistor). If the supply voltage is less than or equal to the LED forward voltage, the resistor result shows a warning because the LED would not light.

Worked example

Supply voltage is 5 V and the LED forward voltage is 2.1 V (a common red LED). The voltage across the resistor is 5 minus 2.1 = 2.9 V. With a desired current of 20 mA (0.020 A), the required resistance is 2.9 / 0.020 = 145 ohms. The nearest E24 standard value is 150 ohms, which allows an actual current of 2.9 / 150 = 19.3 mA. The resistor dissipates 2.9 x 0.020 = 58.0 mW, well within the rating of a standard 250 mW resistor. These match the default values above.

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use

Reviewed and maintained. Last reviewed 2026-07-19 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.