After Newton, astronomers knew that the orbit of a comets must follow an orbit around the sun which is a conic section - usually an ellipse (but you can also have a parabola, hyperbola or circle).

There are 6 numbers needed to define an elliptical orbit, called the Keplerian

elements.

This site shows how to calculate it for satellites orbiting the Earth, but the same principles apply for comets orbiting the Sun. Once you know the orbit, you can work out the period of the orbit.

As soon as a comet was discovered, astronomers traditionally tracked the motion of the comet against the stars, until it eventually disappeared from view. Astronomers try to "fit" these observations to one of the conic sections.

The comet is somewhat fuzzy and asymmetrical, so the position measurements will have some errors, and may not fit

*any* of the conic sections. By taking a large number of measurements, and using

regression analysis, the "best" conic section can be selected.

Today, radar provides an additional source of information, in that it is able to measure the velocity and distance very accurately along the line of sight.

There is an orbital adjustment needed if a comet passes close to a planet, as the planet's gravity can divert it into a different orbit, changing some of the orbital elements. This is most easily predicted by a computer.

Comets which have parabolic or hyperbolic orbits return to interstellar space, so the orbital period is infinite.

Unfortunately, if the comet is only tracked over a small part of its orbit, the uncertainties may be so large that the comet is effectively "lost", until it returns on the next pass of an elliptical orbit.