Skip to content
GEEKnodes

Electronics

Electronics Calculators: Which One to Use and When

Every GEEKnodes electronics calculator in one guide: Ohm's law, LED resistor, resistor color code, capacitor code, voltage divider, battery life and kWh.

In electronics, the same calculations come up again and again: which resistor to use with an LED, what that color-banded component is worth, what voltage comes out of a divider or how long the battery will last. So you don’t have to work them out by hand every time, GEEKnodes has a calculator for each one, with the formula explained and examples.

This page is the index: it tells you which calculator to use depending on the question you have.

In short

  • Ohm’s law: when you have two of these three values (voltage, current, resistance) and need the third.
  • LED resistor: so you don’t burn out an LED or the pin that drives it.
  • Color codes and capacitor codes: to identify a component you’re holding in your hand.
  • Voltage divider: to step down a voltage or measure a battery with the ADC.
  • Battery life and energy use in kWh: to find out how long a project will last or how much a device costs to run.

Which calculator do you need?

Your questionCalculatorBase formula
How much current flows? Which resistor should I use?Ohm’s lawV = I × R
Which resistor does this LED need?LED resistorR = (Vfuente − VLED) / I
What’s the value of this color-banded resistor?Color codeDigits × multiplier
What does the 104 on this capacitor mean?Capacitor codeTwo digits × 10ⁿ pF
What voltage comes out between two resistors?Voltage dividerVout = Vin × R2 / (R1 + R2)
How long will my ESP32’s battery last?Battery lifeUsable capacity / average current
How much does this device add to my bill?Energy use in kWhkWh = W × hours / 1000
Seven electronics calculators: Ohm's law, LED resistor, color code, capacitor code, voltage divider, battery life and energy use in kWh
Pick the calculator based on the question you have.

Ohm’s law: the foundation of everything

It’s the relationship between voltage (V), current (I) and resistance (R). With two values you get the third, and with power (P = V × I) you know whether a component is going to heat up.

Use it to:

  • Find out how much current a circuit draws.
  • Choose the resistor that limits a component’s current.
  • Check whether a 1/4 W resistor can handle it or you need a bigger one.

The Ohm’s law calculator includes the V-I-R triangle and examples with Arduino and sensors.

Ohm's law triangle with V on top and I and R at the bottom, and the formulas V = I × R, I = V / R and R = V / I
Cover the quantity you’re looking for and the triangle gives you the formula.

LED resistor

An LED isn’t connected straight to a power source: without a resistor, the current shoots up and it burns out. The calculator takes into account the supply voltage, the LED’s forward voltage (which depends on the color) and the current you want, and gives you the nearest standard value.

Quick example: a red LED (about 2 V) on a 5 V pin at 10 mA needs (5 − 2) / 0.01 = 300 Ω, which you round up to 330 Ω. All the details are in the LED resistor calculator.

Identifying components: colors and codes

Two calculators for when you have a component in your hand and don’t know what it is:

  • Resistors: the color bands encode the value and the tolerance. The color code calculator supports 4, 5 and 6 bands.
  • Ceramic capacitors: the printed number (104, 103, 472…) gives the capacitance in picofarads. The capacitor code calculator converts it to pF, nF and µF.

If you’re unsure about a reading, measure it: a multimeter measures resistance and, on many models, capacitance too. And to find out what kind of capacitor you have, check out the types of capacitors.

Voltage divider

Two resistors in series split the voltage. It’s the simplest way to:

  • Adapt a 5 V sensor signal to a 3.3 V ESP32 input.
  • Measure a battery’s voltage with the ADC.
  • Create a reference voltage for a comparator.

It’s no good for powering anything: as soon as you connect a load, the voltage changes. For that you need a regulator; we explain it in linear and switching voltage regulators. Work out your values with the voltage divider calculator.

Battery life

The key question for any portable sensor: how long will it last? Battery life depends on the average current draw, which in turn depends on how long the board spends awake and how long asleep.

The battery life calculator for ESP32 and Arduino does the averaging for you. To reduce that consumption, follow the guide to powering an ESP32 from a battery, with deep sleep and choosing the regulator.

A battery-powered sensor and three calculators: resistor for the status LED, voltage divider to measure the battery and battery life
A single project often needs several calculators.

Energy use in kWh

This one isn’t about microcontroller projects but about your home: how many kWh a device uses and what it costs per month and per year. It works for a router, a Raspberry Pi home server or a 3D printer. You’ll find it in the electricity cost calculator.

Other GEEKnodes calculators

Beyond pure electronics, we also have tools for other topics on the blog:

Frequently asked questions

Do the calculators replace understanding the formula? No. They save you time and arithmetic mistakes, but each article explains the formula so you know what you’re calculating and when the result doesn’t make sense.

Why doesn’t the result match a resistor value that actually exists? Resistors are made in series of standard values (E12, E24). Choose the nearest standard value, usually rounding up to limit the current more.

Which calculator should I use first if I’m starting from scratch? The Ohm’s law one and, right after it, the LED resistor one. If you’re just getting started, our Arduino and ESP32 guide suggests a complete order.

Do they work on a phone? Yes, they all run in the browser, on your phone too, without installing anything.

Accessibility preferences

Quick profiles

Text and reading

Text size
Default
Line height
Default
Letter spacing
Default
Word spacing
Default

Colour

Motion and orientation

Cursor