Integer Calculator

Analyze integer properties: even/odd, prime, absolute value, sign, factors, and divisibility.

Select Operation

Result

Integer Analysis
42

Step-by-Step Analysis

42 is even, composite, positive

Understanding Integers

Integers are whole numbers that can be positive, negative, or zero. The set of integers is denoted by the symbol Z and includes {..., -3, -2, -1, 0, 1, 2, 3, ...}. Integers do not include fractions or decimals. They form the foundation of number theory and are used throughout mathematics.

Understanding the properties of integers is essential for arithmetic, algebra, cryptography, and computer science. This calculator helps you explore these properties quickly and with clear explanations.

Integer Properties

Even and Odd

An integer is even if divisible by 2 (remainder 0), odd otherwise.

n is even if n % 2 = 0

Prime Numbers

A prime number is greater than 1 and has no divisors other than 1 and itself.

2, 3, 5, 7, 11, 13, ...

Absolute Value

The distance of a number from zero on the number line, always non-negative.

|n| = n if n >= 0, -n if n < 0

Factors

Integers that divide evenly into the given number with no remainder.

Factors of 12: 1,2,3,4,6,12

GCD (Greatest Common Divisor)

The largest integer that divides both numbers evenly.

GCD(12, 8) = 4

LCM (Least Common Multiple)

The smallest positive integer divisible by both numbers.

LCM(4, 6) = 12

Divisibility Rules

  • By 2: The last digit is even (0, 2, 4, 6, 8).
  • By 3: The sum of the digits is divisible by 3.
  • By 4: The last two digits form a number divisible by 4.
  • By 5: The last digit is 0 or 5.
  • By 6: The number is divisible by both 2 and 3.
  • By 9: The sum of the digits is divisible by 9.
  • By 10: The last digit is 0.

Integer Classification

Integers can be classified in many ways: positive or negative, even or odd, prime or composite (or neither — 0 and 1 are special cases). Understanding these classifications helps in problem solving and number theory.

Tips for Working with Integers

  • Zero is neither positive nor negative; it is even but not prime.
  • 1 is neither prime nor composite — it is a unit.
  • 2 is the only even prime number.
  • Negative numbers are not prime (primality only applies to positive integers greater than 1).
  • The product of two negative integers is positive.