IntegerQ
Examples
open all close allBasic Examples (1)
IntegerQ tests whether an expression is explicitly an integer:
IntegerQ[4]IntegerQ[4 + x]Applications (2)
Test whether an array consists of all integers:
ArrayQ[{{1, 4}, {9, 16}}, _, IntegerQ]ArrayQ[{{1., 4.}, {9., 16.}}, _, IntegerQ]Make a test for Gaussian integers:
gaussIntegerQ[x_] := IntegerQ[Re[x]] && IntegerQ[Im[x]]gaussIntegerQ[1 + 2 I]Properties & Relations (2)
Integers have head Integer:
x = 8529050985092184098210948213048204809218402184;{IntegerQ[x], Head[x]}An expression may have head Integer, but IntegerQ gives False:
IntegerQ[Integer[x]]IntegerQ[Integer[1.2]]Possible Issues (1)
Expressions that do not evaluate to integers explicitly will still give False:
x = GoldenRatio - 1 / GoldenRatio;IntegerQ[x]It is necessary to use symbolic simplification first:
FullSimplify[x]See Also
EvenQ OddQ NumberQ RealValuedNumberQ TrueQ Element Integer Integers
Function Repository: GaussianIntegerQ
Tech Notes
Related Guides
History
Introduced in 1988 (1.0) | Updated in 1999 (4.0)
Text
Wolfram Research (1988), IntegerQ, Wolfram Language function, https://reference.wolfram.com/language/ref/IntegerQ.html (updated 1999).
CMS
Wolfram Language. 1988. "IntegerQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1999. https://reference.wolfram.com/language/ref/IntegerQ.html.
APA
Wolfram Language. (1988). IntegerQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IntegerQ.html
BibTeX
@misc{reference.wolfram_2026_integerq, author="Wolfram Research", title="{IntegerQ}", year="1999", howpublished="\url{https://reference.wolfram.com/language/ref/IntegerQ.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_integerq, organization={Wolfram Research}, title={IntegerQ}, year={1999}, url={https://reference.wolfram.com/language/ref/IntegerQ.html}, note=[Accessed: 12-June-2026]}