total = (double) 100 / listMember.size(); DecimalFormat df = new DecimalFormat("#.##"); String dx = df.format(total); total = Double.valueOf(dx);