Square measurement and error estimation