I am making a small application that aims to calculate the IMC of a person, but I am not able to format the output value to only two decimal places always something like: 22.222222 or 31.23232322 etc ... I have tried to use the "% .2f", but TextView does not. Can someone help me?