Pythagorean win percentage, a Bill James invention, is calculated by taking the square of runs scored and dividing by the sum of the squares of runs scored and runs allowed.
Expected win percentage is nearly the same calculation, but the exponent has been changed to best fit the data. WIS uses an exponent of 1.8 or 1.9 if I recall.