# Integer data type
> Version: _Available or changed with runtime version 1.0._
Stores whole numbers with values that range from -2,147,483,647 to 2,147,483,647.
## Instance methods
The following methods are available on instances of the Integer data type.
Method name|Description
integer-totext-method|Converts the value to a text. Equivalent to calling Format(value, 0, 0).
## Remarks
In addition to representing whole numbers in this range, you can use integers to represent Boolean values. For Boolean values, 1 represents true and 0 represents false.
If you assign -2,147,483,648 directly to an Integer variable, then you get an error when you try to compile the code. However, you can indirectly assign -2,147,483,648 to an Integer variable by using the following code.
```al
IntegerVar := -2147483647;
IntegerVar -= 1;
```
If you try to indirectly assign a value that is smaller than -2,147,483,648 or larger than 2,147,483,647, then you get a run-time error.
## Example 1
The following are examples of integer values.
```al
546
-3425
```
## Example 2
The following example is a decimal and not an integer.
```al
342.45
```
## Related information
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/integer/integer-data-type, 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/integer/integer-data-type/
