Ohm’s law (V = I × R) and the power law (P = V × I) link the four basic electrical quantities. Know any two and you know them all.
Questions
What resistor do I need for an LED?
Subtract the LED voltage from the supply voltage, then divide by the LED current: R = (Vs − Vled) / I.