The modular inverse is a mathematical operation commonly used in discrete math and cryptology. The formula is as follows: Basically, the modular inverse of a number A mod n is the number x in which: It is a tedious algorithm to do, whether you're going the naive route, or using the Extended Euclidean Algorithm. Use our calculator to make it easier for you!