Connect two resistors in series across a supply and the middle point sits at a fraction of the supply voltage, set by the ratio of the lower resistor to the total: Vout = Vin x R2 / (R1 + R2). Equal resistors halve the voltage. A 9 volt supply with 2 kilohms below and 1 kilohm above gives 6 volts out. Dividers are everywhere: they scale a sensor voltage down to what a microcontroller pin accepts, set the bias point of a transistor, and define the reference in countless regulator and comparator circuits. They are cheap, simple and exact, as long as one condition holds.
The formula assumes the output draws no current. Connect a load and it sits in parallel with the lower resistor, dragging the combined value down and the output voltage with it. A divider of 100 kilohm resistors feeding a 100 kilohm load loses a third of its expected output. The working rule is to make the divider current at least ten times the load current, so the load becomes a minor disturbance. That costs power, which is why battery designs use high resistor values and accept more sensitivity to loading, or buffer the output with an op amp follower that draws almost nothing.
Start from the ratio you need, then pick the total resistance from the current you can afford. At 5 volts, a 10 kilohm total draws 0.5 milliamps, a reasonable standing current for many designs. Then split the total in the required ratio and choose the nearest standard values, checking the actual output with the calculator. Remember also that both resistors dissipate power and that the top resistor sees most of the voltage when the ratio is extreme. For sensor scaling, the divider doubles as a safety limit: a fault that puts the full supply on the output pin is worth considering before you connect delicate inputs. The potentiometer on every volume knob is this same circuit with a sliding tap, a divider whose ratio you turn. That reveals the divider's second nature: it is a ratiometric device, and when the thing being measured and the reference share the same supply, supply wobbles cancel out, a trick sensor circuits lean on heavily. A worked example ties it together: to feed a 3.3 volt microcontroller pin from a sensor that swings to 5 volts, choose R1 as 1 kilohm and R2 as 2 kilohms, giving exactly two thirds of the input, 3.33 volts at the pin for a 5 volt peak. Add a small capacitor across R2 and the divider also filters noise, at the price of slowing genuine fast changes.
The free calculator that goes with this guide:
Open the voltage divider calculator