Millersville University/Department of Mathematics

Modular Exponentiation Applet

The Modular Exponentiation can be carried out efficiently through repeated squaring. The Java applet below makes use of the BigInteger class and thus should handle arbitrarily large integers. If you find a case in which the applet fails to function or gives erroneous results, please send me the values of the Base, Exponent, and Modulus which you entered and the contents of your Java console. My modest goal is to have this applet run reliably and accurately.

06/30/2009: This applet had been updated to handle negative exponents. Please email me when any errors or suspicious outputs occur.

You need a Java-enabled browser running JDK 1.1.x or greater to run this applet.

Page maintained by: Robert.Buchanan

Last updated: February 26, 2015