Quick answer: On a new through-hole LED, the longer lead is the positive anode; normal operating current flows from anode to cathode. Adafruit's LED guide explains both the lead-length clue and current direction.
This guide covers identifying loose LED components, understanding reversed connections, and calculating a series resistor for an assumed low-voltage circuit. It also distinguishes ordinary LEDs from RGB and bi-color parts. It is not a mains-powered bulb wiring guide; use a qualified electrician for mains wiring.
How to identify the positive and negative leads
Start with lead length on a new through-hole LED: the longer lead is the anode, which goes toward the more-positive voltage. That is the identification method described by Adafruit. Use this clue within that scope rather than treating the appearance of every LED package as interchangeable.
When lead length does not settle the question, use the part's pin drawing. According to Adafruit's datasheet guide, an LED datasheet identifies which pin is the cathode. This gives you a named terminal to match to the circuit instead of guessing from an unfamiliar package.
| What you have | What establishes polarity | Next decision |
|---|---|---|
| New through-hole LED | The longer lead identifies the positive anode (Adafruit) | Match that lead to the more-positive side of the circuit |
| A part whose lead length is inconclusive | According to Adafruit, the datasheet identifies the cathode (datasheet guide) | Use the pin drawing before assigning polarity |
| RGB LED | Typically four pins: one per color and a shared anode or cathode (SparkFun) | Determine the common terminal's polarity before treating it as a simple LED |
A useful identification checklist is:
- Establish whether the component is an ordinary LED or a multi-color part.
- Use the applicable identification method in the table.
- Compare the identified terminals with the intended circuit direction.
- Calculate the operating current separately, using the supply and forward-voltage assumptions below.
What happens if an LED is connected backwards?
A reversed ordinary LED does not light in the introductory circuits described by Adafruit and SparkFun. Both tutorials describe damage from simply reversing it as difficult or unlikely. That observation is useful for troubleshooting, but it is not a guarantee for an arbitrary supply voltage.
According to Wikipedia's LED article, reverse breakdown is typically about 5 V; exceeding the breakdown voltage can cause a large current and damage the LED. Treat that approximate figure as an explanation of the risk, not a universal safe test voltage.
If a circuit stopped working after an LED was added, polarity is a concrete place to look. According to SparkFun, a reversed LED can block current and prevent an entire circuit from operating properly. With power disconnected, compare its identified terminals with the intended current path before making another powered attempt. Raising the supply voltage is not a substitute for resolving the orientation.
Calculate the resistor after identifying polarity
The resistor calculation starts with the voltage left after the LED's forward-voltage drop: resistor voltage = supply voltage − LED forward voltage. Adafruit's forward-voltage guide explains this voltage balance. The calculation describes the intended forward-connected circuit; it does not establish which physical lead is which.
Use the LED resistor calculator to apply the same relationship with your chosen supply, forward voltage, and current. Keep assumed values distinct from the actual component's operating values.
Worked example: an assumed low-voltage circuit
Assumed inputs: one LED, a 5 V supply, 2.0 V forward voltage, and 20 mA target current. These are example inputs, not universal LED ratings. The site's calculator uses the following resistance and power formulas:
- Convert current: I = 20 mA ÷ 1,000 = 0.020 A.
- Resistor voltage: V_R = V_supply − V_forward = 5 − 2.0 = 3.0 V.
- Resistance: R = V_R ÷ I = 3.0 ÷ 0.020 = 150 Ω.
- Current with that resistance: I = V_R ÷ R = 3.0 ÷ 150 = 0.020 A = 20 mA.
- Resistor power: P = I² × R = 0.020² × 150 = 0.0004 × 150 = 0.060 W.
- Using the calculator's planning figure of a 2× power margin, required rating = 0.060 × 2 = 0.120 W. Its next available rating is 0.125 W, equivalent to 0.125 × 1,000 = 125 mW, or 1/8 W.
The calculated resistance already matches a value in the calculator's resistor list, so no resistance rounding changes this example's current. The power result applies to the resistor; it is not the LED's power consumption.
For the supply wiring, Ohm's law gives cable voltage loss as V_drop = I × R_cable. The voltage drop calculator estimates that loss from the cable inputs, while the wire gauge calculator compares sizes against current and voltage-drop limits. These tools address the supply path after you have established the component's orientation and operating assumptions.
Why RGB and bi-color LEDs need a different interpretation
An RGB LED typically has four pins: three color connections plus one common connection. The common pin can be an anode or a cathode, as SparkFun explains. Counting the pins therefore does not identify the common terminal's polarity; you need the pin assignment for that part.
According to Wikipedia, a bi-color LED can contain two dies connected in opposite directions: current in one direction produces one color, and current in the opposite direction produces the other. For that arrangement, changing color when polarity changes is expected behavior.
Protection features also belong to specific components. According to the WorldSemi WS2812B datasheet hosted by Adafruit, that device includes reverse-connect protection that prevents a reversed power supply from damaging the IC. This statement is specific to the device described in that datasheet; it does not establish protection for a different LED or an entire assembly.
FAQ
Which LED leg is positive?
On a new through-hole LED, the longer leg is the positive anode, according to Adafruit. Use that identification within the stated package and condition.
What if I cannot tell the leads apart by length?
Use the component's pin drawing. According to Adafruit's datasheet guide, it identifies the cathode, allowing you to resolve polarity without relying on lead length.
Does a dark LED prove it is damaged?
No. SparkFun explains that a reversed LED will not work and can block current in the circuit, so darkness alone does not establish permanent damage.
Is the common pin on an RGB LED always negative?
No. RGB LEDs can have a common anode or a common cathode, as SparkFun describes; identify which arrangement your component uses.
Why does reversing my LED change its color?
According to Wikipedia, bi-color LEDs with oppositely connected dies emit different colors for opposite current directions. That behavior fits the bi-color arrangement described above.
Jack Shi
Founder & editor, LEDaskJack Shi builds and writes LEDask, an independent LED-lighting tools project operated by clooms. He designs the calculators, checks their formulas and reference values against published engineering data, and writes the guides across the site.



