To measure the voltage, you need an ADC. Which is called Analog to Digital converter. In arduino, for instance uno has 10 bit ADC, that means you can measure whatever you want as a 10 bit resolution that also means your scale is between 0 to pow(2,10). If you have a better resolution than you get better result as you expect. But here is the one thing that you can just measure the 0-5 volt with only arduino, because if you give much voltage to the analog input then you burn up the board basicly, so we have two problems. One of them is the ability to meausre voltage which is higher then 5 volt, another one is resolution.
The key word is, to measure the voltage higher then 5 Volt, Voltage Divider rule. Using the rule, it is possible to measure the voltage whatever you want theoretically. You can google it the word then you get exactly what you want. But let me explain. You have two resistor. One of them has much resistance then the other. You connect them in serial. So give the voltage difference to this circuit. Then you need to take the voltage information on the resistance which is lower then the other. For example you have 68k resistor and 1 k resitor. Connect them serially and take the voltage difference on the 1 k resistor. So basically, you can measure voltage scale up to 400 volts !! I think that is great !!. That means we solve the scale problem.
So the other problem, that we have to solve, is the resolution. You can ask why is it so important ? Than I can simply answer, If you want to measure the voltage like 56,332124 Volt than resolution will be needed. To get over this problem high resolution adc is needed. I use for example LTC 2400 which has 24 bit resolution. It is from Linear Technology. The situation is, I used the LTC 2400 not ADC of arduino.I just use arduino to take the value and sent it to somewhere.
In the project LTC 2400 module is the heart of the system. You can find the code on the internet which work with arduino. But first time when I used the code I realize that there is no returnable value. I mean you can see the voltage information on the screen but you can not use it in the any mathematical equation. That makes me crazy !! So I modified the code than I wrote it to give me returnable voltage value. I give the code you can check it or use it.