Simple Harmonic Motion Calculator - Position, Speed, Energy

    Position, velocity and acceleration of an oscillator at any moment, from its amplitude and its period or frequency. Add a mass for joules, the equivalent spring constant and peak force.

    Parameters

    Enter data for calculations

    From the center to one end

    Positions in the result use the same unit

    Whichever you know, the unit says which

    Period in s or ms, frequency in Hz or rad/s

    Sets the phase of the sine curve

    Optional. Empty shows the starting state

    Only used when a time is entered

    Optional. Adds joules, stiffness and force

    Only used when a mass is entered

    Form progress0 / 5 fields

    💡 Fill in all required fields to unlock the calculate button

    Four numbers from one 10 cm, two-second oscillation

    Half of every oscillation is spent in the outer 29 percent of its range, crawling near the ends, and only a quarter of a cycle is needed to get from one end to the center. This calculator gives the position, velocity and acceleration of a simple harmonic oscillator at any moment you choose, from its amplitude, its period or frequency, and where it started. An object swinging 10 cm either side of center once every 2 s, released from the middle, is 8.09 cm out and moving at 0.1847 m/s after 0.3 s.

    0.3142 m/s
    top speed, reached only at the center
    0.987 m/s²
    peak acceleration, only at the ends
    166.7 ms
    from the center to half the amplitude
    86.6 %
    of top speed left at half the amplitude

    Why the fastest point carries no force

    Simple harmonic motion is what any system does when the force pulling it back is proportional to how far it has moved: a mass on a spring, a pendulum at small angles, a guitar string, a loudspeaker cone. The position follows a sine curve, x = A sin(ωt + φ), where A is the amplitude, ω the angular frequency (2π divided by the period) and φ the phase at which the clock started.

    Velocity is the slope of that curve and acceleration is the slope of the velocity, which puts the three quantities a quarter of a cycle apart. At the center the position is zero, the restoring force is zero and so is the acceleration, yet the speed is at its peak of Aω. At the ends the object stops for an instant, the force is at its largest and the acceleration reaches Aω². The relation a = -ω²x holds at every moment: acceleration always points back toward the center and grows in step with the distance from it.

    Energy trades places the same way. With a mass entered, the calculator splits the total into potential energy, which is 100 % at the ends, and kinetic energy, which is 100 % at the center. The total never changes, which is the simplest check on any hand calculation: add the two and you should get k A² / 2 at every row of the table.

    One cycle, eight stops

    The table follows the oscillator from the first tile, 10 cm amplitude and a 2 s period, starting at the center and moving outward. Read down any column and the sine and cosine shapes appear on their own; read across any row and the energy shares always add up to one hundred.

    Time Position Velocity Acceleration Potential / kinetic
    0 s0 cm0.3142 m/s0 m/s²0 / 100
    250 ms7.071 cm0.2221 m/s-0.6979 m/s²50 / 50
    500 ms10 cm0 m/s-0.987 m/s²100 / 0
    750 ms7.071 cm-0.2221 m/s-0.6979 m/s²50 / 50
    1 s0 cm-0.3142 m/s0 m/s²0 / 100
    1.25 s-7.071 cm-0.2221 m/s0.6979 m/s²50 / 50
    1.5 s-10 cm0 m/s0.987 m/s²100 / 0
    1.75 s-7.071 cm0.2221 m/s0.6979 m/s²50 / 50
    2 s0 cm0.3142 m/s0 m/s²0 / 100

    Setting it up for your own oscillator

    1. Amplitude - the largest distance from the center, not the full swing from end to end. A swing of 20 cm end to end is an amplitude of 10 cm.
    2. Period or frequency - whichever you have. Seconds and milliseconds are read as the time for one full cycle, hertz as cycles per second, rad/s as angular frequency.
    3. Where it starts - passing the center in either direction, released from either end, or a phase angle of your own in degrees.
    4. Time - the moment you want to look at, in seconds or milliseconds. Leave it empty to see the starting state; times longer than one period are folded back into the cycle.
    5. Mass - optional. It turns the energy split into joules and gives the equivalent spring constant and the peak restoring force.
    6. Read the result - four tiles for the moment you chose, the constants of the motion, the working line, and a table of the whole cycle in eighths with your moment sorted into it.

    Five oscillators side by side

    Same equation, very different numbers. Top speed scales with amplitude times frequency, peak acceleration with amplitude times frequency squared, which is why a string moving one millimeter pulls hundreds of g while a slow ten-centimeter swing barely registers.

    What is moving Amplitude Timing Top speed Peak acceleration
    A slow swing10 cm2 s0.3142 m/s0.987 m/s² (0.1006 g)
    Something bobbing on a spring3 in1.5 Hz0.7182 m/s6.769 m/s² (0.6902 g)
    0.5 kg on a 200 N/m spring5 cm314.2 ms1 m/s20 m/s² (2.039 g)
    A speaker cone on a bass note2 mm50 Hz0.6283 m/s197.4 m/s² (20.13 g)
    A string sounding A41 mm440 Hz2.765 m/s7,643 m/s² (779.4 g)

    The spring row is the same system as a 200 N/m spring holding 0.5 kg. Give this calculator that mass and it reports a total energy of 0.25 J and an equivalent spring constant of 200 N/m, the same figures the Hooke's law calculator gives for that spring stretched 5 cm.

    Things the sine curve hides

    The first half of the distance is the quick half. From the center to half the amplitude takes a twelfth of the period; from there to the end takes a sixth, twice as long. On a 2 s oscillator that is 166.7 ms against 333.3 ms.
    Half the time is spent near the ends. The object is more than 70.7 % of the way out for exactly half of every cycle, so a photograph taken at a random moment has an even chance of catching a pendulum in the outer 29 percent of its range.
    Average speed is not top speed. Over a full cycle the object covers four amplitudes, so its average speed is 2/π, about 63.7 %, of the peak.
    At half the amplitude, three quarters of the energy is already motion. Potential energy goes with the square of the distance, so 50 % of the way out holds only 25 % of it, and the speed there is still 86.6 % of the maximum.
    The period ignores the amplitude. A spring that bounces 1 cm and the same spring bouncing 10 cm keep the same period. A pendulum only comes close to this for small swings, which is why the pendulum calculator gives the exact period once the swing gets large.

    Who reaches for it

    Physics students checking x(t), v(t) and a(t) at a given instant, and seeing the working line and phase that textbooks leave out.
    Engineers and technicians turning a vibration amplitude and frequency into peak acceleration in g, the figure datasheets and mounting specs are written in.
    Musicians and audio builders getting a feel for how hard a string or a speaker cone is working at a given pitch.
    Anyone with a spring and a weight who has measured a period and wants the equivalent stiffness and energy without rearranging formulas.

    What people usually want to know next

    What is the difference between frequency and angular frequency?
    Frequency counts cycles per second, in hertz. Angular frequency counts radians per second, and one cycle is 2π radians, so ω = 2πf. A 0.5 Hz oscillation has an angular frequency of 3.142 rad/s; 10 rad/s is a period of 628.3 ms.
    Which starting point should I pick?
    If you pull something aside and let go, it starts at an end: pick "held at +A and released", which is a phase of 90° and makes the position follow a cosine. If you start the clock as it passes the middle, pick a center option, 0° or 180° depending on the direction.
    Why is the acceleration negative when the position is positive?
    Because it always points back to the center. In a = -ω²x the minus sign is the restoring force: 7.071 cm out on the 2 s oscillator, the acceleration is -0.6979 m/s², and on the other side it is the same size with the opposite sign.
    Can I find the spring constant from a period I measured?
    Yes. Enter the period and the mass, and the result lists the equivalent spring constant k = mω². A 0.5 kg mass with a period of 314.2 ms gives 200 N/m. Time ten cycles and divide by ten; a single cycle is too short to time by hand.
    What happens when my time is longer than one period?
    The motion repeats exactly, so the calculator counts the full cycles and places your moment inside the current one. At 101 s on a 2 s oscillator, 50.5 cycles have passed and the object is back at the center moving the other way.
    Does a real oscillator behave like this forever?
    No. Friction and air take a little energy every cycle, so the amplitude shrinks while the period stays almost unchanged. The ideal model is still the right tool for any single cycle, and for systems that are driven, like a string being bowed or a speaker being powered.

    Related tools

    Buoyancy Calculator

    Whether a floating object bobs at all, and how deep it sits once it stops - See calculator

    Hooke's Law Calculator

    The spring behind the oscillation: force, spring constant and stretch, with the period of a hung mass - See calculator

    Pendulum Period Calculator

    The period of a swinging pendulum from its length, with the exact figure for large swings - See calculator

    Kinetic Energy Calculator

    The energy of motion at the center of the swing, for any mass and speed - See calculator

    Potential Energy Calculator

    Energy stored by height, the form a pendulum's energy takes at the end of a swing - See calculator

    Force Calculator

    Newton's second law, the step from peak acceleration to peak force - See calculator

    Similar calculators from this section