java.text.NumberFormat nf = java.text.NumberFormat.getPercentInstance(); nf.setMinimumFractionDigits(2); String result = nf.format(p);