This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


gives the total of the elements in list.
Total[list, n]
totals all elements down to level n.
Total[list, {n}]
totals elements at level n.
Total[list, {n1, n2}]
totals elements at levels n1 through n2.
  • For a 2D array or matrix:  »
Total[list] or Total[list, {1}] totals for each column
Total[list, {2}] totals for each row
Total[list, 2] overall total of all elements
  • Total[f[e1, e2, ...]] gives the sum of the ei for any head f.  »
  • Total[list, Method->"CompensatedSummation"] uses compensated summation to reduce numerical error in the result.  »
New in 5 | Last modified in 6