# Modulo Calculator

Compute the remainder of integer division, with optional normalization to the positive modulo form

> Canonical page: https://elysiatools.com/en/tools/modulo-calculator

- **Category:** Math & Numbers

- **Keywords:** modulo, remainder, mod, calculator, math

## Overview

The Modulo Calculator is a straightforward mathematical utility designed to compute the remainder of an integer division. By entering a dividend and a divisor, you can instantly find the exact remainder, with an optional feature to normalize the result to a positive modulo form. This tool is particularly useful for programming, cryptography, and scheduling tasks where cyclic patterns and wrap-around logic are involved.

## Inputs

- **Dividend** (number)
- **Divisor** (number)
- **Normalize To Positive Remainder** (checkbox)

## When to use

- When you need to determine the exact remainder of a division operation for mathematical algorithms or programming logic.
- When calculating wrap-around values in cyclic systems like time, days of the week, or circular array indexing.
- When working with negative dividends and you need a strictly positive remainder for consistency across different programming environments.

## How it works

- Enter the number you want to divide in the Dividend field.
- Input the number you are dividing by in the Divisor field.
- Toggle the 'Normalize To Positive Remainder' option if you want to ensure the result is always a positive value, even with negative dividends.
- The calculator instantly processes the division and outputs the exact remainder in JSON format.

## Use cases

- Calculating the day of the week for a future date using modulo 7.
- Determining if a number is even or odd by checking if modulo 2 equals zero.
- Keeping an index within the bounds of an array in circular data structures.

## Frequently asked questions

### What is a modulo operation?

A modulo operation finds the remainder after division of one number by another. For example, 10 modulo 3 equals 1.

### What does the dividend represent?

The dividend is the number being divided. In the expression 29 mod 5, 29 is the dividend.

### What does the divisor represent?

The divisor is the number you divide by. In the expression 29 mod 5, 5 is the divisor.

### Why normalize to a positive remainder?

In some programming languages, modulo with negative numbers yields a negative result. Normalizing ensures the remainder is always positive, which is often required for cyclic calculations like clock arithmetic.

### Can I use negative numbers?

Yes, you can input negative numbers for both the dividend and the divisor to calculate the remainder.

## Related tools

- [Absolute Value Calculator](https://elysiatools.com/en/tools/absolute-value-calculator): Calculate the absolute value of positive, negative, or decimal numbers and explain the sign relationship
- [Air Changes per Hour (ACH, n = Q/V)](https://elysiatools.com/en/tools/air-changes-per-hour): Compute the air change rate (ACH / n) of a room from the outdoor supply airflow Q and the room volume V: n = Q/V (1/h). Three modes: solve ACH (given Q and V), solve airflow (given n and V), or solve volume (given n and Q). Flow in m³/s/m³/h/CFM, volume in m³/ft³/L. Also reports the well-mixed single-zone purge time to reach a target residual fraction ε (default 1%): t = −ln(ε)/n hours.
- [Bearing Life L10 Calculator](https://elysiatools.com/en/tools/bearing-life-l10): Calculate the basic rating life of a rolling bearing: L10 = (C/P)^p, with p = 3 for ball bearings and p = 10/3 for roller bearings. When a speed is provided, converts to L10h in operating hours.
- [Capacitor Reactive Power Calculator (Q_c = 2πfCU²)](https://elysiatools.com/en/tools/capacitor-reactive-power): Compute the reactive power produced by a known capacitor: Q_c = 2π·f·C·U². Supports single-phase, three-phase star (Y) and delta (Δ) connections. Returns Q_c in var/kvar, capacitive reactance Xc, and capacitor current Ic. Complementary to the power-factor-correction tool (which sizes a capacitor for a target cosφ).
- [Chain Sprocket Ratio Calculator](https://elysiatools.com/en/tools/chain-sprocket-ratio): Calculate the ratio, driven speed and chain linear speed of a chain drive. i = z₂/z₁ = n₁/n₂, chain speed v = z₁·p·n₁/60000. Enter the pitch to compute chain speed.
- [COP Calculator (Coefficient of Performance, COP = Q_c / W)](https://elysiatools.com/en/tools/cop-calculator): Compute the Coefficient of Performance (COP) of a chiller / heat pump: COP = Q_c / W, where Q_c is the cooling capacity and W the work input (both in consistent power units; COP is dimensionless). Three modes: solve COP (given Q_c and W), solve cooling capacity (given COP and W), or solve input power (given COP and Q_c). Capacity in W/kW/BTU·h⁻¹/ton/kcal·h⁻¹, power in W/kW/hp; all converted to W internally.
- [DC Motor Back-EMF & Torque Calculator (E=kω, T=kI)](https://elysiatools.com/en/tools/dc-motor-back-emf): Compute the back-EMF and electromagnetic torque of a DC motor from its machine constant: E=k·ω, T=k·I. In SI units the back-EMF constant equals the torque constant (k_e=k_t=k, V·s/rad=N·m/A). Also returns the mechanical (air-gap) power P=T·ω=E·I. Speed accepted in rad/s or RPM.
- [Drag Force Calculator (F_D = ½·ρ·v²·C_D·A)](https://elysiatools.com/en/tools/drag-force-calculator): Compute the drag force on a body in a fluid stream: F_D = ½·ρ·v²·C_D·A (N), where ρ is the fluid density, v the free-stream velocity, C_D the drag coefficient (shape- and Reynolds-dependent), and A the reference (frontal projected) area. A built-in shape library supplies typical high-Re C_D values: sphere 0.47, hemisphere 0.42, long cylinder 0.81, disk/flat plate 1.17, cube 1.05, streamlined airfoil 0.04, long streamlined ellipsoid 0.07, cone 0.50; or choose 'Custom' to enter C_D directly. Optionally, with dynamic viscosity μ and characteristic length L, the Reynolds number Re = ρ·v·L/μ is computed, and the power dissipated by drag P = F_D·v (W). Density in kg/m³/g/cm³, velocity in m/s/km/h, area in m²/cm²/mm², length in m/cm/mm.

## Samples

- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Rust Samples](https://elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion
