complete number calculation