Assuming you total in ounces in in cell A1=INT(A1/128) with get the gallons =MOD(A1,128) will return the ounces