A determinant for reductive groups