I'm not sure about metric sizes, but this applies to US customary units.
The "1/2" designation is just a name - it is not a measurement of anything although in some cases it may be more or less approximately the same value.
For some applications, the outer diameter of the pipe is what is important. For instance, even though 1/2-in copper and 1/2-in PEX are not actually 0.5", they do have the SAME outer diameter and so will both fit many of the same push-fit fittings.
In other cases, such as making sure the desired amount of water flow can be achieved, the inner diameter is what is important. Consult the table below to compare among different types of pipe / tubing.
Nominal Pipe Size O.D. I.D. Type K Copper I.D. Type L Copper I.D. Type M Copper I.D. Pex A, B, or C I.D. PEX-AL-PEX
------------------- ------- -------------------- -------------------- -------------------- --------------------- -----------------
1/4 0.375 0.305 0.315 n/a n/a
3/8 0.5 0.402 0.43 0.45 0.36 0.346"
1/2 0.625 0.527 0.545 0.569 0.485 0.500"
5/8 0.75 0.652 0.666 0.569 0.584 0.637"
3/4 0.875 0.745 0.785 0.811 0.681 0.806"
1 1.125 0.995 1.025 1.055 0.875 1.032"
1-1/4 1.375 1.245 1.265 1.291 1.054 No data
1-1/2 1.625 1.481 1.505 1.527 1.244 No data
2 2.125 1.959 1.985 2.009 1.653 No data
2-1/2 2.625 2.435 2.465 2.495 No data No data
3 3.125 2.907 2.945 2.981 No data No data
3.5 3.625 3.385 3.425 3.459 No data No data
4 4.125 3.857 3.897 3.935 No data No data
5 5.125 4.805 4.875 4.907 No data No data
6 6.125 5.741 5.845 5.881 No data No data
8 8.125 7.583 7.725 7.785 No data No data
So, for example the closest PEX tubing size to a nominal 1/2-in copper pipe (any type) would be a 5/8-in PEX A, B, or C types.
Sources: