Home / Science / Physics / Classical mechanics / Pendulum lab analyserTool #902

Pendulum g calculator: fit g from period and length data, with the large-angle correction

Paste your pendulum lengths and periods (or times for 10 swings) and get g with its uncertainty from a straight-line fit of T² against L, the exact correction for large swings, an optional unknown-length offset, residuals, and how far the small-angle formula is off at any amplitude.

Keep it one tap away for everyday use.

Bookmark Pendulum lab analyser?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Paste data
  2. Amplitude
  3. Fit T² vs L
  4. g ± u
Nothing is uploadedWorks offline once open

Your measurements

A full swing is there and back. Timing 10 or 20 swings and dividing gives much better periods: type 10 in the swings box and paste the total times. The amplitude is the largest angle from the vertical; periods are corrected to small swings with the exact formula before fitting (0 = no correction). The example data are made up.

Gravity from your pendulum

Download

Large-angle correction

The small-angle period 2π√(L/g) is always a little short. The exact period is 2π√(L/g) × 2K(sin(θ₀/2))/π, with K the complete elliptic integral; the series 1 + θ₀²/16 + 11θ₀⁴/3072 is the usual textbook approximation. A point mass on a light string; a real bob, a heavy string and air drag add their own small effects.

What it does

The simple pendulum is the classic way to measure the strength of gravity in a school or university lab. For small swings its period is T = 2π√(L/g), so a graph of T² against L is a straight line through the origin with slope 4π²/g. This analyser fits that line to your measurements by least squares and gives g with its standard uncertainty and a 95 % interval, the residuals, and how your value compares with the one you expect.

It also handles the two things that most often spoil a pendulum result:

  • Large swings. The small-angle formula is only approximate: at 15° the true period is 0.43 % longer, at 30° 1.74 %. If you give the amplitude, each period is corrected with the exact formula (the complete elliptic integral) before fitting.
  • An unknown length offset. If you measured to the top of the bob, or the pivot point is uncertain, choose the fit with an extra length δ. It fits T² = 4π²(L + δ)/g, so the offset no longer biases g, and it tells you δ.

How to use it

  1. Paste or type one line per length: length, period and optionally the amplitude in degrees. A header line is fine, and you can open a CSV or Excel file.
  2. Choose the length unit.
  3. If you timed several swings at once (much more accurate), type how many in full swings and paste the total times.
  4. Give an amplitude for rows that have none, or 0 for no correction.
  5. Choose the fit: through the origin, or with the unknown extra length.
  6. The expected g is only for comparison (about 9.78 at the equator to 9.83 at the poles, rounded).

The second card is a large-angle calculator: for any length and amplitude it shows the small-angle period, the exact period and the series approximation, and a table of the error at amplitudes from 2° to 120°.

Worked example

The made-up example has six lengths from 0.2 m to 1.2 m, each swung at 15°. Fitting through the origin, the page shows g = 9.825 ± 0.017 m/s² (95 % interval 9.7819 to 9.8685), R² = 0.999924 and an rms period scatter of 5.3 ms. It is +0.15 % from 9.81, within two uncertainties. Without the amplitude correction the same data give 9.7411: the 15° swing alone moves g by 0.86 %. Switching to the fit with an extra length gives g = 9.827 ± 0.043 m/s² and δ = 0.157 ± 3.4 mm, consistent with zero, so the lengths were measured correctly. In the correction card, a 1 m pendulum at 30° has a small-angle period of 2.0061 s and an exact period of 2.0410 s, 1.74 % longer.

Tips

  • Time 10 or 20 swings and start counting from “zero” as the bob passes the lowest point, where it moves fastest and the moment is sharpest.
  • Measure the length to the centre of the bob. If you cannot, use the offset fit.
  • Keep the amplitude below about 10°, or record it, and use a dense, small bob so air drag is small.
  • If the residuals curve rather than scatter, look for a length-dependent error such as a stretchy string.

FAQ

Why fit T² and not T? T² is proportional to L, so the graph is a straight line whose slope gives g directly.

How big is the large-angle effect? About θ₀²/16 (θ₀ in radians): 0.05 % at 5°, 0.19 % at 10°, 1.7 % at 30° and 18 % at 90°.

What about a real (physical) pendulum? A large bob or a heavy rod changes the effective length. For a sphere of radius r on a light string, the length becomes L + 2r²/5L; this tool treats the bob as a point.

Where the numbers come from

  • Simple pendulum period, the exact large-amplitude period 4√(L/g) K(sin(θ₀/2)) and its series 1 + θ₀²/16 + 11θ₀⁴/3072: standard classical mechanics results. Complete elliptic integral by the arithmetic-geometric mean (Abramowitz and Stegun, 17.6).
  • Least squares with and without an intercept, standard errors and Student t intervals: standard statistics.
  • Checked against SciPy (ellipk, linregress, Student t quantiles), NumPy least squares with the full covariance matrix, and a SymPy series expansion.
  • The example measurements are made up.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Projectile and drag simulator #901 Launch a ball at any speed, angle and height and see its real path through the air: quadratic drag from its size, mass and drag coefficient, a head- or tailwind, the range, highest point, time of flight, landing speed, the best angle for distance and how much the air costs compared with a vacuum. Trend and anomaly analyser #138 Paste or open a time series (yearly, monthly or any steps) and test for a trend with Mann-Kendall, the Hamed-Rao autocorrelation correction or the seasonal test, get Sen's slope with its confidence interval, a Pettitt change point and anomalies from a baseline period. Moment of inertia builder #904 Build a body from simple uniform parts (rod, disc or cylinder, tube, ring, sphere, shell, box, point mass, and holes), place each one relative to the axis, and get the total moment of inertia with every step shown, the radius of gyration, the centre of mass, the moment about it and the spin energy at any rpm. Video motion tracker #906 Open a phone video, set the scale with a ruler in the shot, click the object in each frame and get x(t), y(t), velocity and acceleration, with straight-line and parabola fits (g from a thrown ball). The video is played in your browser and never uploaded. Coupled oscillators and normal modes #907 Line up to 12 masses joined by springs, between walls or floating free, and get every normal mode: its frequency, period and shape. Watch a single mode or any starting push move, see how the energy is shared between the modes, and download the motion. Lagrangian helper #908 Type the kinetic and potential energy of a system in your own coordinates and get the Lagrangian, the generalised momenta, every Euler-Lagrange equation (simplified, with sin² + cos² = 1), the accelerations or the mass-matrix form, the energy function, and a numerical run that checks energy conservation. Calibration curve with LOD and LOQ #28 Paste your standards and get the calibration line, R², limits of detection and quantitation (ICH Q2), and the concentration of each unknown with a 95 % interval. Uncertainty propagation calculator #25 Type your formula and your measurements with their uncertainties, or paste repeated readings. Get the result with its uncertainty, which input matters most, and a Monte Carlo check. Publication plot maker #27 Paste columns or open a CSV or Excel file and get a clean scientific figure with error bars, sized for a journal column. Download vector SVG or PDF, or PNG at 300 or 600 dpi. Your data stays in your browser.