# System.Round(Decimal [, Decimal] [, Text]) Method
> Version: _Available or changed with runtime version 1.0._
Rounds the value of a numeric variable.
## Syntax
```al
NewNumber :=   System.Round(Number: Decimal [, Precision: Decimal] [, Direction: Text])
```
> NOTE
> This method can be invoked without specifying the data type name.
## Parameters
Number
Type: ../decimal/decimal-data-type
The number that you want to round.
*[Optional] Precision*
Type: ../decimal/decimal-data-type
This optional parameter determines the precision used when rounding. If you do not specify a Precision parameter, then the following steps are used to specify the precision:
1. The method ReadRounding in Codeunit 45, ReadRounding, is called. ReadRounding returns a decimal value that is the precision. By default, the ReadRounding method returns the Amount Rounding Precision field from the GLSetup table.
2. If you have customized Codeunit 45 and it does not implement the ReadRounding method, then the precision is specified as 2 digits after the decimal.
*[Optional] Direction*
Type: ../text/text-data-type
This optional parameter specifies how to round the Number parameter. The default rounding method is '='. The following are the options for rounding:
 '=' rounds up or down to the nearest value (default). Values of 5 or greater are rounded up. Values less than 5 are rounded down.
 '\>' rounds up
 '\<' rounds down
## Return Value
NewNumber
Type: ../decimal/decimal-data-type
## Example
This example shows how to use the Round method.
```al
var
    DecimalToRound: Decimal;
    Direction: Text;
    Precision: Decimal;
    Result: Decimal;
    Text00: Label 'Round(%1, %2, %3) returns %4.';
begin
    DecimalToRound := 1234.56789;
    Direction := '>';
    Precision := 0.001;
    Result := Round(DecimalToRound, Precision, Direction);
    Message(Text000, Format(DecimalToRound,0,1), Precision, Direction, Result);
end;
```
On a computer that has the regional format set to English \(United States\), the message window displays the following:
Round\(1234.56789, 0.001, '>'\) returns 1,234.568
The following table displays some additional Round examples.
Number|Precision|Direction|Rounded number
1234.56789|100|=|1200
1234.56789|10|=|1230
1234.56789|1|=|1235
1234.56789|0.1|=|1234.6
1234.56789|0.001|=|1234.568
1234.56789|0.001|\<|1234.567
1234.56789|0.001|>|1234.568
-1234.56789|100|=|-1200
-1234.56789|10|=|-1230
-1234.56789|1|=|-1234
-1234.56789|0.1|=|-1234.6
-1234.56789|0.001|=|-1234.568
-1234.56789|0.001|\<|-1234.567
-1234.56789|0.001|>|-1234.568
When you round down \('\<'\) a negative number, such as -1234.56789, it is rounded down to -1234.567. However, -1234.567 is a mathematically greater value than -1234.56789.
When you round up \('>'\) a negative number, such as -1234.56789, it is rounded up to -1234.568. However, -1234.568 is a mathematically smaller value than -1234.56789.
## Related information
system-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/system/system-round-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/system/system-round-method/
