SMD capacitor selection
Marcus has it almost correct.
You don't calculate the voltage of a capacitor, you read it from the specifications. Any supplier worth dealing with will present you with the voltage information.
However, with ceramic capacitors, especially high capacitance small package ones, you have to interpret what the voltage means for the capacitance.
If you buy a high capacitance ceramic that's rated (say) 6.3 V 4.7 uF, then you will be able to apply 6.3 V without it breaking. However, you may find that at 6.3 V its capacitance had dropped to much less than 2 uF, once you've taken tolerance, temperature coefficient and voltage coefficient into account. This is important if it's being used to stabilise a voltage regulator, or hold up a circuit during a brownout.
The problem is that modern high-K ceramics have a fierce voltage coefficient of capacitance, and that designations like Y5U do not code for the voltco, only for the tempco. In order to find out what the voltco of a particular capacitor ceramic is, you may well have to take the package size into account, as you comb through the manufacturer's data sheets, because they may use a different dielectric if they choose to offer the same capacitance and voltage rating in a smaller size package. Often data sheets with sufficient information are not easily available, even on the manufacturer's website, and you may have to ask them directly. Once you've characterised a particular brand, voltage, capacitance and package size, you'll need to ensure you can always source that particular one.
This problem only occurs with high-K ceramics. Electrolytics, film capacitors, and low-K ceramics like NP0 have a negligible voltage coefficient. Older high-K dielectrics like X7R have a voltco in the several percent, which is not negligible, but is not as surprising and fierce as the newer high-K's.
The workaround for high-K ceramics to make sure you have enough capacitance is to use the capacitor at less than half its rated voltage, or to specify several times the capacitance you really need. If you want a close tolerance value, then you should not be using ceramics.