In the surface of a real donut you have a lot of problems due to the curvature and the different sizes, so the calculation is very complicated. For example, in a real donut the circle at the top and at the bottom of the donut have different length that the two circles at the equator. In the torus in this page all the horizontal circles have the same length.
This is a magical torus, where all the horizontal and vertical circles have the same length. It also has no Gaussian curvature. You can't construct one of this magical torus as a surface in the 3D space, but you can construct one as a surface in the 4D space.