It may also be interesting to calculate the example for an input of 24-30 volts and instead of reading the output digitally use one of the analog-pins and the analogRead()-function.
Problem with reading just HIGH or LOW digitally is that an arduino-pin will probably already see an HIGH if you read it digitally when it's connected to a voltage higher as 3-3.5 volts (datasheet will probably give you the number when it goes high).
Using the voltage divider calculated for 12 volts and connecting a 9-volt battery digitally would already trigger a HIGH.
Using an analog-pin and analogRead(), you could calculate what.... voltage is applied to VH in the example.
VO should be connected to the analogpin (or digital) of the arduino, VL should be connected to ground of the powersupply and ground of the arduino.
With 22000 ohm as R1, 4700 as R2 you could calculate voltages connected to VH up to 28 volt safely.
Reading 12volt digitally... might result in a LOW using these values though.