RSA Encryption Learning

Calculate n and φ(n)

Learn how to calculate the RSA modulus n and Euler's totient function φ(n)

RSA Calculator

Results

Enter two prime numbers to see the results

Interactive Examples

Example 1: Small Prime Numbers

Let's try with p = 3 and q = 5:

n = 3 × 5 = 15

φ(n) = (3 - 1) × (5 - 1) = 2 × 4 = 8

Example 2: Medium Prime Numbers

Let's try with p = 11 and q = 13:

n = 11 × 13 = 143

φ(n) = (11 - 1) × (13 - 1) = 10 × 12 = 120

Practice Exercises

Exercise 1

Calculate n and φ(n) for p = 7 and q = 11

Exercise 2

Calculate n and φ(n) for p = 17 and q = 19