Euler totient (phi) calculator

φ(9)\varphi\left(9\right)

Interactive tools require JavaScript. You can read the guide and example without it.

How to use this calculator

Calculate Euler's totient: count positive integers up to the input that are coprime to it.

Enter a positive integer n to count the integers from 1 through n that are coprime to it.

Click or tap the equation to edit it. Press Tab to keep a result. Outside a matrix, press Enter to continue on a new line. Right-click an equation for more actions.

Controls and shortcuts

  • In math, typing shortcuts turn letter combinations into symbols as you type. Try pi for π or oo for ∞.
  • Use ^ for a power, _ for a subscript and / for a fraction. Use the arrow keys to move through the expression.
  • On a physical keyboard, hold a letter to see related symbols. Use the keyboard icon to open the on-screen math keyboard for symbols, functions and matrices.

Browse all calculators and editors