Calculate fee