It's the remainder operator and is used to get the remainder after integer division. Lots of languages have it. For example:

10 % 3 // = 1 ; because 3 * 3 gets you 9, and 10 - 9 is 1.

Apparently it is not the same as the modulo operator entirely.

Answer from MarioDS on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Operators › Remainder
Remainder (%) - JavaScript | MDN
In JavaScript, the modulo operation (which doesn't have a dedicated operator) is used to normalize the second operand of bitwise shift operators (<<, >>, etc.), making the offset always a positive value.
🌐
Reddit
reddit.com › r/programming › understanding the javascript modulo operator
r/programming on Reddit: Understanding the JavaScript Modulo Operator
December 12, 2023 - The post explains the Modulo operator (%) in JavaScript, which is often misunderstood and appears to produce random values. The author clarifies its function by redefining how we think about division, emphasizing that it's about dividing a number into equally-sized groups without fractional remainders.
Discussions

char - How can I use modulo operator (%) in JavaScript? - Stack Overflow
How can I use modulo operator (%) in calculation of numbers for JavaScript projects? More on stackoverflow.com
🌐 stackoverflow.com
How to Use Modulo Operator (%) in JavaScript - TestMu AI Community
How can I use the modulo operator (%) in JavaScript? How can I apply the javascript modulo operator in calculations for my JavaScript projects? More on community.testmu.ai
🌐 community.testmu.ai
0
August 2, 2024
Difference between modulo operator and remainder
Hi! this is my first post here and I hope someone can help me. Could anyone please explain to me, what’s the difference between remainder (%) and the modulo operator please? More on forum.freecodecamp.org
🌐 forum.freecodecamp.org
0
September 24, 2023
Understanding the JavaScript Modulo Operator
A quick peek at the documentation would reveal that % in JavaScript is not modulo, it's the remainder operator (or can be found in the ECMAScript specification ). This is confusing to many people, and unfortunately articles like these don't help by using the wrong terminology. The difference occurs when one of the values is negative. -21 % 4 The result of this is 3 for "mod" and -1 for "rem". This can be confusing behavior, if for example, to implement an isOdd function, you might think of something like this: function isOdd(n) { return n % 2 === 1 } However, this is wrong! It returns false for an input of -1. More on reddit.com
🌐 r/programming
9
0
December 12, 2023
🌐
W3Schools
w3schools.com › js › js_arithmetic.asp
JavaScript Arithmetic
The modulus operator (%) returns the division remainder. let x = 5; let y = 2; let z = x % y; Try it Yourself » · In arithmetic, the division of two integers produces a quotient and a remainder. In mathematics, the result of a modulo operation is the remainder of an arithmetic division.
🌐
Josh W. Comeau
joshwcomeau.com › javascript › modulo-operator
Understanding the JavaScript Modulo Operator • Josh W. Comeau
In that case, we'd be able to fit 2 items into each group, and we'd be left with 3 additional items: ... This is known as the remainder. It's what the modulo operator produces.
🌐
freeCodeCamp
freecodecamp.org › news › javascript-modulo-operator-how-to-use-the-modulus-in-js
JavaScript Modulo Operator – How to Use the Modulus in JS
November 7, 2024 - The modulo operator in JavaScript, also known as the remainder operator, is used to find the remainder after dividing one number by another.
🌐
LogRocket
blog.logrocket.com › home › mastering the modulo operator in javascript: a complete guide
Mastering the modulo operator in JavaScript: A complete guide - LogRocket Blog
June 4, 2024 - For example, when we divide 10 by three, we get a quotient of three and a remainder of one. We can also write this as 1 (mod 3). In JavaScript, the modulo operator gets the remainder of a division operation.
Find elsewhere
🌐
Mimo
mimo.org › glossary › javascript › modulo-operator
JavaScript Modulo Operator: Syntax, Usage, and Examples
The JavaScript modulo operator is a mathematical operator used to return the remainder after division of one number by another. It is one of the core arithmetic operators in JavaScript, yet it’s often misunderstood—particularly when working with negative numbers or in more advanced programming ...
🌐
TestMu AI Community
community.testmu.ai › ask a question
How to Use Modulo Operator (%) in JavaScript - TestMu AI Community
August 2, 2024 - How can I use the modulo operator (%) in JavaScript? How can I apply the javascript modulo operator in calculations for my JavaScript projects?
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › modulus-arithmetic-operator-in-javascript
Modulus(%) Arithmetic Operator in JavaScript - GeeksforGeeks
July 23, 2025 - The modulus (%) arithmetic operator in JavaScript returns the remainder after dividing one number by another.
🌐
Wikipedia
en.wikipedia.org › wiki › Modulo
Modulo - Wikipedia
1 week ago - But in a language where modulo has the sign of the dividend, that is incorrect, because when n (the dividend) is negative and odd, n mod 2 returns −1, and the function returns false. One correct alternative is to test that the remainder is not 0 (because remainder 0 is the same regardless of the signs): ... Modulo operations might be implemented such that a division with a remainder is calculated each time.
🌐
freeCodeCamp
forum.freecodecamp.org › javascript
Difference between modulo operator and remainder - JavaScript - The freeCodeCamp Forum
September 24, 2023 - Hi! this is my first post here and I hope someone can help me. Could anyone please explain to me, what’s the difference between remainder (%) and the modulo operator please?
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-remainder-operator
JavaScript Remainder(%) Operator - GeeksforGeeks
July 23, 2025 - Modulo and Remainder work differently when the sign of both operands is different. In JavaScript remainder takes the sign of the dividend and to get modulo ((a % n) + n) % n should be used instead of a % n.
🌐
Career Karma
careerkarma.com › blog › javascript › javascript modulo: a how-to guide
JavaScript Modulo: A How-To Guide | Career Karma
December 1, 2023 - The JavaScript modulo operator returns the remainder of a division sum. To calculate the remainder of a division sum, use the percentage sign (%). The syntax for the modulo operator is: (number_one % number_two).
🌐
Codedamn
codedamn.com › news › javascript
JavaScript Modulo Operator Guide With Examples
June 3, 2023 - The modulo operator, represented by the percentage symbol (%), is a commonly used operator in JavaScript that returns the remainder of a division operation. In other words, it tells you what's left over after dividing two numbers.
🌐
Quora
quora.com › What-is-the-reason-for-the-absence-of-a-modulo-operator-in-JavaScript-What-is-the-alternative-for-it
What is the reason for the absence of a modulo operator in JavaScript? What is the alternative for it? - Quora
Answer (1 of 2): Only the designers and inventors of JavaScript can speak to exactly why they didn’t include a modulo operator. I can make an educated guess. JavaScript was designed to be very similar to other popular programming languages like c and Java. Having a remainder operator(%) but not a...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Operators
Expressions and operators - JavaScript | MDN
Strict inequality operator. Operations to shift all bits of the operand. ... Bitwise left shift operator. ... Bitwise right shift operator. ... Bitwise unsigned right shift operator. Bitwise operators treat their operands as a set of 32 bits (zeros and ones) and return standard JavaScript numerical values.
🌐
2ality
2ality.com › 2019 › 08 › remainder-vs-modulo.html
Remainder operator vs. modulo operator (with JavaScript code)
For example, x mod 2**8 is used ... assert.equal(tarr[0], 1); Which of rem and mod is supported and how depends on the programming language: JavaScript‘s % operator is a remainder operator....
🌐
Medium
medium.com › @stitans28 › javascript-remainder-operator-101-794f4df28c87
JavaScript Remainder Operator 101 | by Shawn Townsend | Medium
August 4, 2022 - JavaScript uses the % symbol to represent the remainder operator (also known as the modulo/modulus operator). The remainder operator works by dividing a value by another and when it isn’t evenly distributed the modulus operator returns the ...