This example will show how to convert a formatted number stored string to a number by parsing it as text using DecimalFormat. When you know the format of a given string you can pass it the constructor of DecimalFormat. Then by calling the DecimalFormat.parse method it will convert the string into a number. Be aware that if the number does not match the format a ParseException will be thrown so handle appropriately.