Back to Physics calculators

Simple Harmonic Motion (SHM) simulator — with steps and energy

Simulate spring-mass simple harmonic motion with analytic, Euler-Cromer, or RK4 solvers. Follow each step in How it's calculated and export charts, tables, and CSV files.

Built for physics and calculus lessons. Derive amplitude and phase from x₀ and v₀, keep omega and energy summaries visible, and share the same setup by URL. Calculations stay in your browser.

Other languages 日本語 | English | 简体中文 | 繁體中文 | 繁體中文(香港) | Español | Español (México) | Português (Brasil) | Português (Portugal) | Bahasa Indonesia | Tiếng Việt | 한국어 | Français | Deutsch | Italiano | Русский | हिन्दी | العربية | বাংলা | اردو | Türkçe | ไทย | Polski | Filipino | Bahasa Melayu | فارسی | Nederlands | Українська | עברית | Čeština
Spring-mass parameters

Keyboard shortcuts: Ctrl+Enter runs the solver, Ctrl+S downloads the CSV.

Result summary

How it's calculated

    FAQ

    Which equations does the SHM simulator use?

    We model a one-dimensional spring-mass system. The tool computes ω = sqrt(k/m) and T = 2π/ω, then evaluates x(t), v(t), and a(t) from the SHM equations. It also logs kinetic, potential, and total energy over time.

    When should I choose Euler-Cromer or RK4?

    Euler-Cromer is simple and keeps energy reasonably bounded, even with larger time steps. It works well for quick classroom demos. RK4 is higher-order and usually tracks the analytic curve within about 1e-3, so it suits accurate plots and assignment checks.

    Where are the calculations performed?

    All calculations run in your browser only. The inputs you enter are not sent to the server, so you can safely use classroom examples or assignment data.

    What should I enter first?

    Start with the minimum required inputs shown above the calculate button, then keep optional settings at their defaults for a first pass. After getting a baseline, change one parameter at a time so you can explain which assumption moved the output.

    How precise are the results?

    The calculator keeps internal precision and rounds only for display. Small differences can still appear if another tool uses different constants, period conventions, or rounding rules. Align assumptions before comparing final values.

    How to use Simple Harmonic Motion (SHM) simulator — with steps and energy effectively

    What this calculator does

    This page is for estimating outcomes by changing inputs in one controlled workflow. The model keeps your focus on variables, not output shape. Start with stable assumptions, then test sensitivity by changing one key input at a time to observe directional impact.

    Input meaning and unit policy

    Each input has an expected unit and a typical range. For reliable interpretation, check whether you are using the same unit system, period, and base assumptions across all runs. Unit mismatch is the most common source of unexpected drift in numeric results.

    Use-case sequence

    A practical sequence is: first run with defaults, then create a baseline log, then run one alternative scenario, and finally compare only the changed output metric. This sequence reduces cognitive load and prevents false pattern recognition in early experiments.

    Common mistakes to avoid

    Avoid changing too many variables at once, mixing incompatible data sources, and interpreting a one-time output without checking robustness. A single contradictory input can flip conclusions, so keep each experiment minimal and document assumptions as part of your note.

    Interpretation guidance

    Review both magnitude and direction. Direction tells you whether a strategy moves outcomes in the desired direction, while magnitude helps you judge practicality. If both agree, you can proceed; if not, rebuild the baseline and verify constraints before deciding.