🔢 Math Tool · 10 Operations · Number Line Visual · Steps
Integer Calculator
Perform all operations on integers — add, subtract, multiply, divide, GCD, LCM, modulo, power, factorial and absolute value. Full step-by-step solution and number line visual included.
🔢
Addition of Integers
Enter integers — positive, negative, or zero
Examples:
—
📏 Number Line
📐 Step-by-Step Solution
Integer Operations — Complete Guide
Integers (ℤ) are whole numbers including positives, negatives, and zero. This calculator handles all 10 fundamental integer operations with full step-by-step explanations.
a + b | a − b | a × b | a ÷ b | a mod b
aⁿ (Power) | GCD(a,b) | LCM(a,b) | n! (Factorial) | |n| (Absolute Value)
Rules for Integer Operations
Adding same signs: Add absolute values, keep the sign → (−3) + (−5) = −8
Adding different signs: Subtract, keep sign of larger absolute value → (−8) + 3 = −5
Multiplying/Dividing: Same signs → positive. Different signs → negative → (−4) × (−5) = +20
Modulo: Remainder after division → 17 mod 5 = 2 (because 17 = 3×5 + 2)
GCD: Largest number that divides both → GCD(12,8) = 4
LCM: Smallest number divisible by both → LCM(4,6) = 12
Integers are whole numbers — positive, negative, or zero — with no fractions or decimals. Examples: ..., −3, −2, −1, 0, 1, 2, 3, ... The symbol ℤ represents the set of all integers. They do NOT include fractions (½) or decimals (3.14).
Subtract the smaller absolute value from the larger, then use the sign of the number with the bigger absolute value. Example: −8 + 3: |−8|=8 > |3|=3, so 8−3=5 and the sign is negative → result = −5. Example: −3 + 8: |8|=8 > |−3|=3, so 8−3=5, sign is positive → result = +5.
GCD (Greatest Common Divisor) is the largest integer that divides both numbers exactly. Calculated using the Euclidean algorithm: GCD(a,b) = GCD(b, a mod b) until b=0. Example: GCD(48,18): 48=2×18+12 → GCD(18,12): 18=1×12+6 → GCD(12,6): 12=2×6+0 → GCD=6.
Modulo (%) returns the remainder when dividing two integers. Formula: a mod b = a − b × floor(a/b). Example: 17 mod 5 = 17 − 5×3 = 2. Used heavily in programming, number theory, and checking if a number is even (n mod 2 = 0 means even).
Factorial (n!) = product of all integers from 1 to n. n! = n × (n−1) × ... × 2 × 1. Examples: 5! = 120, 10! = 3,628,800. By convention, 0! = 1 (defined to make combination formulas work). Only non-negative integers have factorials.
LCM (Least Common Multiple) is the smallest positive integer divisible by both numbers. Formula: LCM(a,b) = |a×b| ÷ GCD(a,b). Example: LCM(4,6) = |4×6| ÷ GCD(4,6) = 24 ÷ 2 = 12. Check: 12÷4=3 ✓ and 12÷6=2 ✓. Used in adding fractions with different denominators.
Rule 1 — Same signs: Add absolute values, keep the sign. (−3)+(−5)=−8. Rule 2 — Different signs: Subtract the smaller absolute value from larger, keep sign of bigger. (−8)+3: |8|>|3|, so 8−3=5, sign=negative → −5. (+3)+(−8): |8|>|3|, so 8−3=5, sign=negative → −5.
CalcVelo Integer Calculator — Free math tool. Perform all integer operations: addition, subtraction, multiplication, division, modulo, power, GCD, LCM, factorial, and absolute value. Positive and negative integers supported with step-by-step solutions.