We can calculate the square directly by multiplying 31 by itself; But there is an easier method.
We know the difference of the squares of two consecutive natural numbers is equal to the sum of the two numbers. That means,
312−302=31+30
we know that 302=900
So, 312=900+31+30=961