The equation of motion of a pendulum is:

where
it its length and
is the gravitational acceleration. Notice that the mass is absent from the equation! This is quite hard to solve, but for small angles (
), we can use:

Additionally, let us define:

We can now write:

The solution to this differential equation is:

where
and
are constants to be determined using the initial conditions. Notice that they will not have any influence on the period, since it is given simply by:

This justifies that the period depends only on the pendulum's length.