Web platform features explorer

Math.sumPrecise()

Limited availability
Tags: javascript Groups: JavaScript

The Math.sumPrecise() static method returns the sum of an iterable of numbers. It avoids the precision loss of intermediate partial sums, as found using reduce() or a loop to add together an array of values.

Specifications

Browser support

  • Chrome
  • Chrome Android
  • Edge
  • Firefox 137 Released on 2025-04-01
  • Firefox for Android 137 Released on 2025-04-01
  • Safari
  • Safari on iOS