This template has two different functions dependent on input.

  1. If only one parameter is given the template counts the number of significant figures of the given number within the ranges 1012 to 10-12 and -10-12 to -1012. It ignores any digits outside of this range.
  2. If two parameters are given the template rounds the first number to the number of significant figures given by the second.
  • {{significant figures|123.456|7}} gives 123.4560 [1]
  • {{significant figures|123.456|6}} gives 123.456 [2]
  • {{significant figures|123.456|5}} gives 123.46 [3]
  • {{significant figures|123.456|4}} gives 123.5 [4]

  • {{significant figures|123,456|3}} gives 1,23,000 [5]
  • {{significant figures|12345.6|3}} gives 12,300 [6]
  • {{significant figures|1234.56|3}} gives 1,230 [7]
  • {{significant figures|12.3456|3}} gives 12.3 [8]
  • {{significant figures|1.23456|3}} gives 1.23 [9]

  • {{significant figures|.123456|3}} gives 0.123 [10]
  • {{significant figures|.0123456|3}} gives 0.0123 [11]
  • {{significant figures|.00123456|3}} gives 0.00123 [12]
  • {{significant figures|0.123456|3}} gives 0.123 [13]
  • {{significant figures|0.0123456|3}} gives 0.0123 [14]
  • {{significant figures|0.00123456|3}} gives 0.00123 [15]

  • {{significant figures|123.456|2}} gives 120 [16]
  • {{significant figures|123.456|1}} gives 100 [17]
  • {{significant figures|123.456|0}} gives 0 [18]

  • {{significant figures|987654321|9}} gives 98,76,54,321 [19]
  • {{significant figures|987654321|8}} gives 98,76,54,320 [20]
  • {{significant figures|987654321|7}} gives 98,76,54,300 [21]
  • {{significant figures|987654321|6}} gives 98,76,54,000 [22]
  • {{significant figures|987654321|5}} gives 98,76,50,000 [23]
  • {{significant figures|987654321|4}} gives 98,77,00,000 [24]
  • {{significant figures|987654321|3}} gives 98,80,00,000 [25]
  • {{significant figures|987654321|2}} gives 99,00,00,000 [26]
  • {{significant figures|987654321|1}} gives 1,00,00,00,000 [27]