{"uid":"cap_j-1-J41yH-y5yYaadMDUb","slug":"baseball-rate-stats-calculator-f3cfe558","name":"Baseball Rate Stats Calculator","description":"Baseball rate stats from counting stats: AVG, OBP, SLG, OPS, ISO, BABIP for batters; ERA, WHIP, K/9, BB/9, FIP for pitchers.","url":"https://sports-calc.x402tookit.com/baseball-stats?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":[],"properties":{"h":{"type":"integer","description":"Hits"},"ab":{"type":"integer","description":"At bats (batting)"},"bb":{"type":"integer","description":"Walks"},"er":{"type":"integer","description":"Earned runs (pitching)"},"hr":{"type":"integer","description":"Home runs"},"ip":{"type":"string","description":"Innings pitched in baseball notation, 180.1 = 180 1/3 (pitching)"},"sf":{"type":"integer","description":"Sacrifice flies"},"so":{"type":"integer","description":"Strikeouts"},"hbp":{"type":"integer","description":"Hit by pitch"},"doubles":{"type":"integer","description":"Doubles"},"triples":{"type":"integer","description":"Triples"},"bbIssued":{"type":"integer","description":"Walks issued (pitching)"},"hAllowed":{"type":"integer","description":"Hits allowed (pitching)"},"hrAllowed":{"type":"integer","description":"Home runs allowed (pitching)"},"soPitched":{"type":"integer","description":"Strikeouts recorded (pitching)"},"hbpPitched":{"type":"integer","description":"Batters hit by pitch (pitching)"},"fipConstant":{"type":"number","description":"League FIP constant, default 3.10"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"ops":{"type":["null","number"]},"asOf":{"type":["null","string"]},"babip":{"type":["null","number"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"slugging":{"type":["null","number"]},"walkRate":{"type":["null","number"]},"onBasePct":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"totalBases":{"type":["null","number"]},"isolatedPower":{"type":["null","number"]},"strikeoutRate":{"type":["null","number"]},"battingAverage":{"type":["null","number"]},"plateAppearancesApprox":{"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_K0uCzcrUgykyrwYkcouQn","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":"Calculates baseball rate statistics for batters (AVG, OBP, SLG, OPS, ISO, BABIP) and pitchers (ERA, WHIP, K/9, BB/9, FIP) from raw counting stats.","exampleAgentPrompt":"Can you calculate all the standard batting stats — AVG, OBP, SLG, OPS, ISO, and BABIP — for a player who had 145 hits, 520 at bats, 62 walks, 28 home runs, 30 doubles, 4 triples, 5 sacrifice flies, and 3 hit by pitches?","exampleUseCases":[{"title":"Season batting stats for fantasy baseball","prompt":"My fantasy player finished the season with 162 hits, 540 at bats, 70 walks, 35 home runs, 38 doubles, 2 triples, 6 sacrifice flies, and 4 hit by pitches — can you compute his AVG, OBP, SLG, OPS, ISO, and BABIP for me?"},{"title":"Pitcher ERA and FIP evaluation","prompt":"A pitcher threw 210.2 innings, gave up 78 earned runs, allowed 180 hits, issued 55 walks, gave up 22 home runs, struck out 195 batters, and hit 8 batters — can you calculate his ERA, WHIP, K/9, BB/9, and FIP using a FIP constant of 3.10?"},{"title":"Prospect scouting rate stat conversion","prompt":"I'm scouting a minor leaguer with these counting stats: 88 hits, 310 at bats, 40 walks, 12 home runs, 18 doubles, 3 triples, 3 sacrifice flies, and 2 hit by pitches — give me all his standard batting rate stats including BABIP and OPS."}],"resultDescription":"Returns computed baseball rate statistics including batting metrics (AVG, OBP, slugging, OPS, ISO, BABIP, walk rate) for batters and pitching metrics (ERA, WHIP, K/9, BB/9, FIP) for pitchers, along with a summary, any reasons or caveats, and a degraded flag if inputs were insufficient for some calculations.","failureModes":["Missing required counting stats result in null values for affected metrics","Invalid innings pitched format may cause pitching stat calculation failures","Division-by-zero scenarios (e.g. zero at bats) return null for dependent stats","Negative or out-of-range stat values may produce unexpected results"],"whenToPreferThis":"Use this endpoint when you need to convert raw baseball counting stats into standard rate statistics for batters or pitchers. It handles both offensive metrics (AVG, OBP, SLG, OPS, ISO, BABIP) and pitching metrics (ERA, WHIP, K/9, BB/9, FIP) in a single call, making it ideal for fantasy baseball analysis, scouting reports, or any sabermetric evaluation workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:20:47.722Z","isFirstParty":false,"canonicalSlug":"baseball-rate-stats-calculator-f3cfe558"}