formula area of square code example Example: area of square Area of square = Length (or width, whichever) to the power of 2