Elysia Tools

Browse tools, examples, visual explainers, and topic guides from one clear workspace.

Top Categories

Hubs

Language
ZHDERUPTENFRES

Elysia Tools

Navigation

Math & Numbers

Euler Totient Function φ(n) Calculator

· Last updated:2026-08-27

Exact φ(n) from trial-division factorization (n ≤ 10¹²) with optional coprime listing and Euler's theorem recall.

Execution

Run this tool

Fill in the form, run the tool, and review the result in one place.

Samples

Examples that match this tool

Related

Continue with connected tools and hubs

Written by the Elysia Tools team

Tool usage guide

Learn when to use this tool, what it supports, and how real users apply it.

Key facts

Category
Math & Numbers
Input types
text, select
Output type
text
Sample coverage
4
API ready
Yes

Overview

The Euler Totient Function φ(n) Calculator computes the exact count of positive integers up to n that are relatively prime to n for any integer up to 10¹². Using trial-division factorization, it outputs the prime factors, calculates φ(n) using Euler's product formula, recalls Euler's theorem, and can optionally list the first 60 coprime integers.

When to use

  • Determining the order of multiplicative groups in modular arithmetic and abstract algebra.
  • Solving number theory problems involving coprimality and Euler's totient theorem.
  • Analyzing modulus properties and key spaces in RSA or other cryptographic algorithms.

How it works

  1. 1Enter a positive integer n within the range 1 ≤ n ≤ 10¹².
  2. 2Select the desired output detail to view either the factorization and φ(n) value or include a list of coprime numbers.
  3. 3The tool performs prime factorization using trial division to identify all distinct prime factors of n.
  4. 4It applies Euler's product formula φ(n) = n · Π(1 − 1/p) to generate the exact totient value along with Euler's theorem statement.

Use cases

  • Mathematics students verifying modular arithmetic assignments and prime factorization steps.
  • Cryptography learners exploring key generation mechanics and Euler's totient relations.
  • Programmers and contest participants validating number theory algorithms against exact φ(n) outputs.

Examples

1. Calculating Totient for Composite Integer 36

Math Student

Background

A student needs to find the number of integers coprime to 36 and inspect the coprime set for a homework assignment.

Problem

Calculate φ(36) and list all coprime integers between 1 and 36.

How to use

Input 36 for Number n and select 'Also list coprimes (first 60)' in the Output detail field.

n: 36, detail: list

Outcome

Displays the prime factorization 36 = 2² × 3², the totient result φ(36) = 12, all 12 coprime integers (1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35), and Euler's theorem note.

2. Evaluating Totient for Prime Number 97

Computer Science Instructor

Background

An instructor preparing modular exponentiation examples wants to demonstrate totient behavior on prime moduli.

Problem

Confirm the value of φ(97) and verify Euler's theorem representation for prime modulus 97.

How to use

Enter 97 in the Number n field and set Output detail to 'Factorization and φ(n) value'.

FAQ

What is Euler's totient function φ(n)?

Euler's totient function φ(n) counts the number of positive integers from 1 to n that share no common positive divisors with n other than 1 (i.e., gcd(a, n) = 1).

What is the maximum number supported by this calculator?

The calculator supports any positive integer n such that 1 ≤ n ≤ 10¹².

How does the tool calculate φ(n) for prime numbers?

For any prime number p, all preceding positive integers are coprime to p, so the totient evaluates directly to φ(p) = p − 1.

How many coprime numbers can the tool display in list mode?

When the list mode is enabled, the tool displays up to the first 60 coprime integers.

What is Euler's theorem stated in the results?

Euler's theorem states that if gcd(a, n) = 1, then a raised to the power of φ(n) is congruent to 1 modulo n (a^φ(n) ≡ 1 mod n).

Home
Tools3212
Samples593
Visualizations471
Viewers103
Hubs239
Tags333
Images, Audio & Video657

Image, audio, and video processing, conversion, and optimization tools

Math, Date & Finance647

Calculators, numerics, date logic, statistics, and finance tools

Design & Color298

Color, layout, graphics, visual styling, and design helper tools

Text & Writing209

Writing, cleanup, formatting, extraction, and text analysis tools

Developer & Web193

Developer utilities, networking, web debugging, and automation helpers

Conversion & Encoding175

Format, file, archive, unit, and encoding conversion tools

Lead Generation Quiz Launch and Contact Handoff
Memorial Drafts: Family Review and Print Handoff
Private Habit Records: Backup, Restore and Sharing Review
Article to X and LinkedIn Drafts: Fact Review and Handoff
Markdown Interactive Deck Review and Offline Handoff

© 2026 Elysia Tools. All rights reserved.

DocsPricingAboutTerms of ServicePrivacy PolicyCookiesContact
Python

Web Image Processing Python Samples

Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion

Java

Android Image Processing Java Samples

Android Java image processing examples including reading/saving images, scaling, and format conversion

Kotlin

Android Image Processing Kotlin Samples

Android Kotlin image processing examples including reading/saving images, scaling, and format conversion

Rust

Web Image Processing Rust Samples

Web Rust image processing examples including image read/save, scaling, and format conversion

Math & Numbers

Carmichael Function λ(n) Calculator

Group exponent λ(n) from prime factorization with φ(n) comparison, primitive-root existence, Korselt's Carmichael-number detection, and optional sample-unit verification.

Math & Numbers

Chinese Remainder Theorem Solver (System of Congruences)

Generalized pairwise-merge CRT for 2–20 congruences: coprime moduli give the product modulus, consistent non-coprime moduli give the lcm, inconsistent systems are rejected.

Math & Numbers

Permutation / Combination / Subset Generator (With Repeats)

Deduplicated, lexicographic permutations / combinations / subsets of up to 12 items with exact multiset counts; display capped at 200 entries.

Math & Numbers

Zero-Sum Game Solver (Saddle Point / Linear Programming)

Two-person zero-sum games: saddle-point test first, then mixed strategies from a single-phase simplex LP with dual shadow prices, verified by security-level checks.

n: 97, detail: value

Outcome

Returns φ(97) = 96 derived from prime property φ(p) = p − 1 and specifies a^96 ≡ 1 (mod 97).