You can use fixed resistors, and they need not be precision. You have to calibrate the divider/ADC combination anyway, by measuring a known voltage. After all, the ADC reference voltage is not known with much accuracy, unless you measure it too.
I would use an ~8:1 divider for ~40V max (68K/10K) on a 5V Arduino.