Round
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
- Round rounds numbers of the form x .5 toward the nearest even integer.
- Round[x] returns an integer when x is any numeric quantity, whether or not it is an explicit number.
- Round[x] applies separately to real and imaginary parts of complex numbers.
- If a is not a real number, Round[x,a] is given by the formula Round[x,a]a Round[x/a]. »
- For exact numeric quantities, Round internally uses numerical approximations to establish its result. This process can be affected by the setting of the global variable $MaxExtraPrecision.
- Round automatically threads over lists. »
Examples
open all close allBasic Examples (3)
Scope (32)
Numerical Evaluation (8)
Round[5.37]Round[-3.7]Round[-10.3, 3.5]Round[2Pi - E, 5 / 4]Value at two consecutive half-integers:
{Round[2.5], Round[3.5]}Round[5.37 - 1.3I]Single-argument Round always returns an exact result:
Round[123.4`45]The two-argument form tracks the precision of the second argument:
Round[100`45, 13.2456`10]Evaluate efficiently at high precision:
Round[7545 / 4660`10000]//TimingN[Round[(E + Pi) ^ 2 - E ^ 2 - Pi ^ 2 - 2E Pi], 10^6]//TimingRound can deal with real‐valued intervals:
Round[Interval[{-1, 3 / 2}]]Compute the elementwise values of an array using automatic threading:
Round[{{1 / 2, -1}, {5 / 3, 1 / 2}}]Or compute the matrix Round function using MatrixFunction:
MatrixFunction[Round, {{1 / 2, -1}, {5 / 3, 1 / 2}}]//FullSimplifyCompute average-case statistical intervals using Around:
Round[Around[3 / 2, 0.01]]Specific Values (6)
Values of Round at fixed points:
Table[Round[n], {n, {1 / 7, 5 / 4, 7 / 3, 5 / 2}}]Round[0]Value at Infinity:
Round[Infinity]PiecewiseExpand[Round[x], 0 < x < 4]Manipulate Round symbolically:
Reduce[Round[x] + Round[2x + 1] == 0, x, Reals]Find a value of x for which Round[x,2]=2:
xval = x /. FindRoot[Round[x, 2] == 2, {x, 1.5}]Plot[Round[x], {x, -1, 3}, Epilog -> Style[Point[{xval, Round[xval]}], PointSize[Large], Red], ExclusionsStyle -> Dotted]Visualization (4)
Plot the Round function:
Plot[Round[x], {x, -3, 3}, Filling -> Axis]Visualize the two-argument form:
Plot[Round[x, .5], {x, -3, 3}, Filling -> Axis]Plot Round in three dimensions:
Plot3D[Round[x, y], {x, -3, 3}, {y, -3, 3}, ColorFunction -> "BlueGreenYellow"]Visualize Round in the complex plane:
ComplexPlot3D[Round[z], {z, 3}, PlotLegends -> Automatic]Function Properties (10)
Round[x] is defined for all real and complex inputs:
FunctionDomain[Round[x], x]FunctionDomain[Round[x], x, Complexes]Round[x,a] is defined for a!=0:
FunctionDomain[Round[x, a], {x, a}]Round can produce infinitely large and small results:
FunctionRange[Round[x], x, y]//QuietRound is an odd function in its first argument:
Round[-x] == -Round[x]Round is an even function in its second argument:
Round[x, -a] == Round[x, a]//FullSimplifyRound is not an analytic function:
FunctionAnalytic[Round[x], x]It has both singularities and discontinuities:
FunctionSingularities[Round[x], x]FunctionDiscontinuities[Round[x], x]Round is nondecreasing:
FunctionMonotonicity[Round[x], x]FunctionMonotonicity[Round[x, a], x, Assumptions -> a > 0 || a < 0]Round is not injective:
FunctionInjective[Round[x], x]Plot[{Round[x], 1}, {x, -4, 4}]Round is not surjective:
FunctionSurjective[Round[x], x]Plot[{Round[x], -2.5}, {x, -4, 4}]Round is neither non-negative nor non-positive:
FunctionSign[Round[x], x]Round is neither convex nor concave:
FunctionConvexity[Round[x], x]Differentiation and Integration (4)
First derivative with respect to x:
D[Round[x], x]First derivative with respect to a:
D[Round[x, a], a]//FullSimplifyIntegrate[Round[x ^ 2], {x, 0, 3}]Series[Round[x ^ 2], {x, Sqrt[3 / 2], 2}, Assumptions -> Element[x, Reals]]Applications (2)
Table[Round[(GoldenRatio ^ k) / Sqrt[5]], {k, 15}]Table[Fibonacci[k], {k, 15}]Click the bars to hear the name of the country and its rounded GDP per capita:
countries = CountryData["G7"];
data = Table[With[{country = c, v = Round@CountryData[c, "GDPPerCapita"]}, Button[v, Speak[StringJoin[country["Name"], ",$", ToString[v]]]]], {c, countries}];BarChart[data, PlotLabel -> "GDP Per Capita", ChartLabels -> Placed[countries, Below, Rotate[#, Pi / 2.4]&]]Properties & Relations (6)
Negative numbers also round to the nearest integer:
Round[{-2.4, -2.5, -2.6}]Round[x,a] gives the multiple of a nearest to x:
Round[16, 3]In general, it can be expressed in terms of the one-argument form as follows:
FunctionExpand[Round[x, a]]{Round[x, a], %} /. {x -> 17 + 2I, a -> 5 + 3I}Round[x,-a] is equal to Round[x,a]:
FullSimplify[Round[x, -a] == Round[x, a]]At midpoints, Round rounds toward even integers:
Round[{0.5, 1.5, 2.5, 3.5, 4.5}]Round[{-0.5, -1.5, -2.5, -3.5, -4.5}]This is also true of the two-argument form, where it rounds toward even multiples:
{Round[9, 2], Round[11, 2]}Round to nearest multiples of 10:
Round[{5, 15, 25, 35, 45}, 10]Perform a piecewise expansion of an expression involving Round:
PiecewiseExpand[Round[Sqrt[x]], 0 < x < 10]Possible Issues (1)
Round does not automatically resolve the value:
Round[-π ^ 2 - 2π - 1 / 2 + (π + 1) ^ 2]Simplify[%]See Also
IntegerPart Floor Ceiling Chop Rescale Divisible Rationalize FindDivisions
Function Repository: DecimalRound
Tech Notes
Related Guides
History
Introduced in 1988 (1.0) | Updated in 1996 (3.0) ▪ 2007 (6.0)
Text
Wolfram Research (1988), Round, Wolfram Language function, https://reference.wolfram.com/language/ref/Round.html (updated 2007).
CMS
Wolfram Language. 1988. "Round." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/Round.html.
APA
Wolfram Language. (1988). Round. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Round.html
BibTeX
@misc{reference.wolfram_2026_round, author="Wolfram Research", title="{Round}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/Round.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_round, organization={Wolfram Research}, title={Round}, year={2007}, url={https://reference.wolfram.com/language/ref/Round.html}, note=[Accessed: 12-June-2026]}