Calculating transformer ratio