Round

Rounds a number to the closest integer.

Round( number [, precision ] )

Returns: Number

Argument Description Default
number
number, required

Number to round

precision
number, optional

Number of decimal points to round to

0

Examples

<cfoutput>
  <cfset var pi = 3.1415926535 />
  <cfset var pi_rounded = Round(pi, 2) />
  pi: #pi#
  <br/>
  pi_rounded: #pi_rounded# <!--- 3.14 --->
</cfoutput>

See also