Modular Arithmetic Calculator

Compute modular operations, modular inverses, and two-congruence CRT solutions.

Scratchpad (not saved)

CRT

What This Calculator Does

This calculator performs the core operations of modular arithmetic and also handles modular inverses and a two-congruence Chinese Remainder Theorem solve. It is meant for practical number-theory work where residues and congruences are the natural language of the problem.

It combines Operation, a, b / exponent, Modulus m to estimate Result, Details, gcd.

Formula & Method

Core equations: Modular inverse solves ax\equiv1\pmod m when \gcd(a,m)=1. Two-congruence CRT solves x\equiv a\pmod m and x\equiv b\pmod n when residues agree modulo \gcd(m,n).

Notation used in the formulas: R = Result; x_{1} = Operation; x_{2} = a; x_{3} = b / exponent; x_{4} = Modulus m; x_{5} = CRT Residue 1; x_{6} = CRT Modulus 1.

Method summary: inputs are normalized to consistent units, core equations are evaluated, then secondary values are derived and rounded for display.

Use it when working with remainders, cyclic systems, modular powers, or reconstructing a number from simultaneous congruence conditions.

Inputs Used

  • Operation: Used directly in the calculation.
  • a: Used directly in the calculation.
  • b / exponent: Used directly in the calculation.
  • Modulus m: Used directly in the calculation.
  • CRT Residue 1: Used directly in the calculation.
  • CRT Modulus 1: Used directly in the calculation.
  • CRT Residue 2: Used directly in the calculation.
  • CRT Modulus 2: Used directly in the calculation.

Related Calculators

  • Prime Factorization CalculatorFactor an integer and derive divisor-count, divisor-sum, Euler totient, and divisor list.
  • Graph Theory CalculatorAnalyze a small weighted undirected graph for connectivity, shortest paths, MST, coloring, and traversal properties.
  • Boolean Algebra SimplifierMinimize a Boolean function from minterm and don't-care masks using Quine-McCluskey for up to four variables.
  • Percentage CalculatorPerform common percentage operations: find a percentage of a value, calculate what percentage one number is of another, and find percentage change.
  • Fraction CalculatorAdd, subtract, multiply, or divide two fractions and simplify the result.
  • Ratio CalculatorSimplify a ratio and compute equivalent forms.
  • Proportion CalculatorSolve proportions of the form a / b = c / x.
  • Average CalculatorCompute mean, median, and mode from up to five values.