When decimalFormat(1000) returns 1,000, it throws error when later trying to calulate based on this number.  Use numberFormat to exclude comma.