⭕ Ford Circles & Farey Sequence

Every reduced fraction p/q between 0 and 1 has a Ford circle tangent to the number line at p/q with radius 1/(2q²). Watch the Farey sequence build itself through mediant insertion, zoom into the number line, and discover why these circles touch but never overlap.

About this simulation

Written by MySimulator Team · Reviewed by MySimulator Editorial Review

Last updated: 11 July 2026

This tool draws every Ford circle for the fractions in a Farey sequence. For a reduced fraction p/q, its Ford circle is tangent to the number line at x=p/q with radius 1/(2q²) — so fractions with small denominators get large circles, and fractions with large denominators get tiny circles hugging the line. As the Farey order n increases, new fractions squeeze in as mediants of their neighbours, and their Ford circles slot perfectly between the existing ones, always tangent, never overlapping.

🔬 What it shows

Every reduced fraction p/q in the Farey sequence Fn gets a circle of radius 1/(2q²) tangent to the number line at x=p/q. Neighbouring fractions in the sequence satisfy bc−ad=1, which is exactly the condition that makes their circles tangent to each other rather than overlapping.

🎮 How to use

Drag the order slider to grow the Farey sequence up to n=20, press Show mediant construction to watch it build step by step, toggle fraction labels on or off, and scroll or drag on the canvas to zoom and pan along the number line.

💡 Did you know?

Ford circles connect directly to the Stern-Brocot tree and continued fractions: the chain of mediants leading to a fraction traces its continued-fraction expansion, and how fast the circles shrink along the way measures how well that fraction resists approximation by simpler ones.

Frequently asked questions

What is a Ford circle?

A Ford circle is a circle associated with a reduced fraction p/q that is tangent to the number line at the point x=p/q. Its centre sits at (p/q, 1/(2q²)) and its radius is also 1/(2q²), so smaller denominators produce larger circles and larger denominators produce circles that hug the line ever more tightly.

What is the Farey sequence?

The Farey sequence Fn is the list of every reduced fraction p/q with 0≤p/q≤1 and denominator q no larger than n, arranged in increasing order. As n grows, new fractions squeeze in between the existing ones, and Fn contains exactly 1+φ(1)+φ(2)+…+φ(n) terms, where φ is Euler's totient function.

Why do Ford circles never overlap?

Two Ford circles for fractions a/b and c/d are either tangent to each other or completely disjoint — they can never cross. The squared distance between their centres equals the squared sum of their radii exactly when |bc−ad|=1, and is strictly greater otherwise, so the circles can touch at exactly one point but never intersect at two.

What is a mediant and why does it matter?

The mediant of two fractions a/b and c/d is (a+c)/(b+d). For any two neighbouring fractions in a Farey sequence, the mediant is the simplest new fraction that lies strictly between them, and it is exactly the fraction that appears once the Farey order n grows large enough to include denominator b+d. This mediant-insertion process is how the whole Farey sequence — and the whole family of Ford circles — can be built up step by step.

How are Ford circles related to continued fractions and the Stern-Brocot tree?

The Stern-Brocot tree is built by the same mediant process as the Farey sequence, and every rational number's position in that tree corresponds exactly to its continued-fraction expansion. Following the chain of Ford circles that lead to a fraction traces its continued fraction digit by digit, and the rate at which circles shrink along the way reflects how well that fraction can be approximated by simpler rationals — the basis of Diophantine approximation theory.