Calculating LED resistor value, this is very easy and the most of you had this in the school.
A typical LED requires 20 mA and has a voltage of 2 V across it when it is working. The power supply for the circuit could be 9 V – Block battery.
For the right calculation you need three values:
1. Power supply (Your Battery 9 V)
2. LED voltage (2 V)
3. The current flowing (20 mA)