{"uid":"cap_8R8L5Funm1Ax_-KmPWyju","slug":"physics-calculators-pendulum-spring-oscillator-9afcf376","name":"Physics Calculators: Pendulum & Spring Oscillator","description":"Period and frequency of a simple pendulum (exact for large swings) or a mass on a spring.","url":"https://physics-calc.x402tookit.com/oscillator?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"pendulum or spring"},"massKg":{"type":"number","description":"Mass in kg (spring)"},"gravity":{"type":"number","description":"Gravity in m/s2 (default 9.80665)"},"lengthM":{"type":"number","description":"Pendulum length in metres (pendulum)"},"amplitudeDeg":{"type":"number","description":"Pendulum swing amplitude 0 to 175 degrees (default 0 = small angle)"},"springConstantNPerM":{"type":"number","description":"Spring constant in N/m (spring)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"gravity":{"type":["null","number"]},"periodS":{"type":["null","number"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"frequencyHz":{"type":["null","number"]},"amplitudeDeg":{"type":["null","number"]},"smallAnglePeriodS":{"type":["null","number"]},"periodIncreasePercent":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CK1aIdOSUx7amqB4yKDMq","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the period and frequency of a simple pendulum (with exact large-angle correction) or a mass-spring system given physical parameters.","exampleAgentPrompt":"What's the period and frequency of a pendulum that's 1.5 metres long swinging at 30 degrees amplitude, and how does that compare to the small-angle approximation?","exampleUseCases":[{"title":"Grandfather clock pendulum design","prompt":"I'm designing a grandfather clock — what period and frequency would a 0.994-metre pendulum have with a small swing angle? I want to confirm it ticks once per second."},{"title":"Lab spring-mass oscillation check","prompt":"We have a 0.25 kg mass on a spring with a spring constant of 40 N/m. What's the oscillation period and frequency for that system?"},{"title":"Large-angle pendulum correction","prompt":"I have a pendulum that's 2 metres long and I'm swinging it all the way to 90 degrees. How much longer is the actual period compared to the small-angle approximation?"}],"resultDescription":"Returns the oscillation period in seconds, frequency in Hz, and (for pendulums) the small-angle period, the amplitude in degrees, the gravity used, and the percentage increase in period due to large-angle effects. Includes a summary string and optional disclaimer about accuracy.","failureModes":["Missing required 'type' query parameter returns an error","Passing spring parameters without massKg or springConstantNPerM causes a failure","Amplitude outside 0–175 degrees range may return a validation error","Requesting a type other than 'pendulum' or 'spring' returns an error","Payment failure (x402) prevents the request from being fulfilled"],"whenToPreferThis":"Choose this endpoint when you need a quick, accurate oscillator calculation — especially when large-angle pendulum corrections matter. It is more accurate than simple small-angle formula implementations for amplitudes above ~15 degrees. Prefer over a general physics AI if you need structured numeric output (period, frequency) rather than a text explanation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T00:34:27.456Z","isFirstParty":false,"canonicalSlug":"physics-calculators-pendulum-spring-oscillator-9afcf376"}