{"openapi":"3.1.0","info":{"title":"Calcgrid API","version":"1.0.0","summary":"184 deterministic calculators with structured results","description":"Open calculator engine for AI agents and people: finance, health, math, unit conversion, physics, chemistry, statistics and everyday calculators, each available as HTML, Markdown, JSON API, MCP tool and A2A skill.\n\nEvery calculation endpoint returns the same envelope: success, request (tool, calculator_id, inputs, request_id), result (values, units, formula, summary, status), sources, freshness, cache, timestamp, next_actions, links. Errors use HTTP status codes 400/404/405/422/429/500 with a structured error object (code, message, field, hint, retryable). Rate limit: 600 requests/min/IP fair use (429 + Retry-After). No authentication. Docs: https://tttkmbb.com/docs/index.md · MCP: https://tttkmbb.com/mcp · llms.txt: https://tttkmbb.com/llms.txt","contact":{"name":"Calcgrid","url":"https://tttkmbb.com/docs"},"license":{"name":"Free to use; results are informational","url":"https://tttkmbb.com/docs/index.md"},"x-logo":{"url":"https://tttkmbb.com/favicon.svg"}},"servers":[{"url":"https://tttkmbb.com","description":"Production"}],"tags":[{"name":"discovery","description":"Listing, search and schema endpoints."},{"name":"calculate","description":"Generic calculation, conversion and task endpoints."},{"name":"finance","description":"Finance: Interest, loans, mortgages, savings, returns, taxes, discounts and business margins."},{"name":"health","description":"Health: Body metrics and nutrition: BMI, BMR, TDEE, body fat, ideal weight, macros, hydration, heart-rate zones, due date."},{"name":"fitness","description":"Sports & Fitness: Pace, race-time prediction, calories burned, one-rep max, VO2 max, steps and cycling."},{"name":"math","description":"Math: Percentages, algebra, number theory, sequences, fractions, exponents, logarithms and rounding."},{"name":"geometry","description":"Geometry: Area, perimeter, volume and surface area of 2D and 3D shapes; right-triangle solver."},{"name":"statistics","description":"Statistics & Probability: Descriptive statistics, z-scores, normal and binomial probability, confidence intervals, sample size, regression."},{"name":"conversion","description":"Unit Conversion: Length, mass, temperature, area, volume, speed, time, data, energy, pressure, power, angle, fuel economy and more."},{"name":"physics","description":"Physics: Kinematics, forces, energy, momentum, electricity, waves, gravitation, thermodynamics."},{"name":"chemistry","description":"Chemistry: Molar mass, moles, molarity, dilution, ideal gas law, pH, half-life, percent yield."},{"name":"everyday","description":"Everyday Life: Dates, ages, countdowns, trip fuel cost, electricity cost, tips, unit prices, grades, reading time, sleep."},{"name":"food","description":"Food & Cooking: Recipe scaling, cooking unit conversion, coffee ratio, calories from macros, dough and brine calculations."},{"name":"construction","description":"Construction & Home: Flooring, paint, concrete, tiles, roof pitch, stairs, gravel, drywall, fencing and decking estimates."}],"security":[],"paths":{"/api/v1":{"get":{"operationId":"get_api_index","tags":["discovery"],"summary":"API index","description":"Lists all endpoints of API v1 with their purpose.","responses":{"200":{"description":"Endpoint index","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/status":{"get":{"operationId":"get_service_status","tags":["discovery"],"summary":"Service status","description":"Service status, version, calculator and tool counts, timestamp. Use it to check availability before a batch of calls.","responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["operational"]},"version":{"type":"string"},"calculators":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"}}}}}}}}},"/api/v1/categories":{"get":{"operationId":"list_calculator_categories","tags":["discovery"],"summary":"List categories","description":"Calculator categories with ids, names, descriptions and counts.","responses":{"200":{"description":"Categories","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}}}}},"/api/v1/calculators":{"get":{"operationId":"list_calculators","tags":["discovery"],"summary":"List calculators","description":"List all calculators, optionally filtered by category and/or keyword query. Each entry has calculator_id, tool_name, description, use_when, required_inputs and URLs.","parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["finance","health","fitness","math","geometry","statistics","conversion","physics","chemistry","everyday","food","construction"]},"description":"Category id."},{"name":"query","in":"query","required":false,"schema":{"type":"string"},"description":"Keyword filter."}],"responses":{"200":{"description":"Calculator list","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"422":{"description":"Unknown category","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/search":{"get":{"operationId":"search_calculators","tags":["discovery"],"summary":"Search calculators","description":"Ranked keyword search over names, tags, descriptions and categories. Use it to find the calculator_id for a task.","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string"},"description":"Free-text query.","example":"mortgage"},{"name":"category","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"Ranked matches","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"400":{"description":"Missing query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculators/{calculator_id}":{"get":{"operationId":"get_calculator_schema","tags":["discovery"],"summary":"Calculator schema","description":"Full definition: inputs with types/units/ranges/defaults, outputs, formula, sources, freshness, examples, FAQ, related calculators, JSON Schema of inputs and outputs.","parameters":[{"name":"calculator_id","in":"path","required":true,"schema":{"type":"string"},"example":"bmi"}],"responses":{"200":{"description":"Definition","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaEnvelope"}}}},"404":{"description":"Unknown calculator","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/{calculator_id}":{"post":{"operationId":"run_calculator","tags":["calculate"],"summary":"Run any calculator (JSON body)","description":"Run a calculator by id with a JSON body {\"inputs\": {...}} (a flat object of inputs is also accepted). Same response envelope as the GET endpoints.","parameters":[{"name":"calculator_id","in":"path","required":true,"schema":{"type":"string"},"example":"bmi"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":true}}},"example":{"inputs":{"weight_kg":70,"height_cm":175}}}}},"responses":{"200":{"description":"Calculation result","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter / invalid JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Unknown calculator","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/convert":{"get":{"operationId":"convert_units","tags":["calculate"],"summary":"Convert units","description":"Convert a value between two units of the same quantity. Symbols and common names are accepted (km, miles, °F, 'square feet', kWh, psi, mpg).","parameters":[{"name":"value","in":"query","required":true,"schema":{"type":"number"},"example":5},{"name":"from_unit","in":"query","required":true,"schema":{"type":"string"},"example":"mi"},{"name":"to_unit","in":"query","required":true,"schema":{"type":"string"},"example":"km"}],"responses":{"200":{"description":"Converted value","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"422":{"description":"Unknown unit or mismatched quantities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/units":{"get":{"operationId":"list_units","tags":["calculate"],"summary":"List units","description":"All unit symbols supported by convert_units grouped by quantity.","parameters":[{"name":"quantity","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Units","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}}}}},"/api/v1/tasks/{task_id}":{"get":{"operationId":"get_task","tags":["calculate"],"summary":"Get a task (re-derive a calculation)","description":"Task ids are content-addressed: the id encodes the calculator and inputs, so the completed task is re-derived without storage. Status is always 'completed' for valid ids.","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Task","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskEnvelope"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/compound-interest":{"get":{"operationId":"calculate_compound_interest","tags":["finance"],"summary":"Compound Interest Calculator","description":"Computes the future balance of a principal earning compound interest at a chosen compounding frequency, optionally with a fixed deposit at the end of every month, and splits the result into contributions and interest.\n\nUse when: You need to project a savings account, certificate of deposit or investment balance from a starting amount, an annual rate, a term and optional monthly deposits.\nDo not use when: Interest is not reinvested (use simple-interest), you need the deposit required to hit a target (use savings-goal), or you are repaying a loan (use loan-payment).\nFormula: A = principal × (1 + r/n)^(n·years) with r = annual_rate_percent/100 and n periods per year. Contributions: i_m = (1 + r/n)^(n/12) − 1, m = 12·years, FV_contrib = monthly_contribution × ((1 + i_m)^m − 1) / i_m (m × contribution when r = 0). final_balance = A + FV_contrib.\nDocs: https://tttkmbb.com/finance/compound-interest.md","parameters":[{"name":"principal","in":"query","required":true,"description":"Starting amount deposited or invested, in any currency.","schema":{"description":"Starting amount deposited or invested, in any currency.","type":"number","minimum":0,"maximum":1000000000000,"examples":[10000]},"example":10000},{"name":"annual_rate_percent","in":"query","required":true,"description":"Nominal annual rate (APR) in percent; 5 means 5 %. Unit: %.","schema":{"description":"Nominal annual rate (APR) in percent; 5 means 5 %. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[5],"x-unit":"%"},"example":5},{"name":"years","in":"query","required":true,"description":"Length of the investment in years; fractional years allowed (2.5 = 30 months). Unit: years.","schema":{"description":"Length of the investment in years; fractional years allowed (2.5 = 30 months). Unit: years.","type":"number","maximum":200,"exclusiveMinimum":0,"examples":[10],"x-unit":"years"},"example":10},{"name":"compounding_frequency","in":"query","required":false,"description":"How often interest is credited: n = 1, 2, 4, 12, 52 or 365 periods per year. One of: annually, semiannually, quarterly, monthly, weekly, daily.","schema":{"description":"How often interest is credited: n = 1, 2, 4, 12, 52 or 365 periods per year.","type":"string","enum":["annually","semiannually","quarterly","monthly","weekly","daily"],"default":"monthly","examples":["monthly"]},"example":"monthly"},{"name":"monthly_contribution","in":"query","required":false,"description":"Optional fixed deposit made at the end of every month, compounded at the effective monthly rate implied by compounding_frequency.","schema":{"description":"Optional fixed deposit made at the end of every month, compounded at the effective monthly rate implied by compounding_frequency.","type":"number","minimum":0,"maximum":1000000000,"default":0,"examples":[0]},"example":0}],"x-calculator-id":"compound-interest","x-outputs":["final_balance","total_contributions","total_interest","effective_annual_rate_percent [%]","growth_multiple"],"x-example":{"inputs":{"principal":10000,"annual_rate_percent":5,"years":10,"compounding_frequency":"monthly"},"expected":{"final_balance":16470.09,"total_contributions":10000,"total_interest":6470.09,"effective_annual_rate_percent":5.1162,"growth_multiple":1.647}},"responses":{"200":{"description":"Result with values final_balance, total_contributions, total_interest, effective_annual_rate_percent, growth_multiple","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/simple-interest":{"get":{"operationId":"calculate_simple_interest","tags":["finance"],"summary":"Simple Interest Calculator","description":"Computes interest that accrues only on the original principal (no compounding) over a term in years, and the resulting total amount.\n\nUse when: The agreement states simple, non-compounding interest, e.g. short-term personal loans, some bonds and statutory interest on late payments, or you want a quick estimate.\nDo not use when: Interest is reinvested or charged on accrued interest (use compound-interest), or you need the level payment of an amortizing loan (use loan-payment).\nFormula: interest = principal × (annual_rate_percent / 100) × years; total_amount = principal + interest\nDocs: https://tttkmbb.com/finance/simple-interest.md","parameters":[{"name":"principal","in":"query","required":true,"description":"Amount lent, borrowed or deposited.","schema":{"description":"Amount lent, borrowed or deposited.","type":"number","minimum":0,"maximum":1000000000000,"examples":[1000]},"example":1000},{"name":"annual_rate_percent","in":"query","required":true,"description":"Simple annual rate in percent; 5 means 5 %. Unit: %.","schema":{"description":"Simple annual rate in percent; 5 means 5 %. Unit: %.","type":"number","minimum":0,"maximum":1000,"examples":[5],"x-unit":"%"},"example":5},{"name":"years","in":"query","required":true,"description":"Term in years; fractional values allowed (6 months = 0.5, 90 days = 90/365 ≈ 0.2466). Unit: years.","schema":{"description":"Term in years; fractional values allowed (6 months = 0.5, 90 days = 90/365 ≈ 0.2466). Unit: years.","type":"number","minimum":0,"maximum":200,"examples":[3],"x-unit":"years"},"example":3}],"x-calculator-id":"simple-interest","x-outputs":["interest","total_amount","interest_per_year","interest_per_month"],"x-example":{"inputs":{"principal":1000,"annual_rate_percent":5,"years":3},"expected":{"interest":150,"total_amount":1150,"interest_per_year":50,"interest_per_month":4.17}},"responses":{"200":{"description":"Result with values interest, total_amount, interest_per_year, interest_per_month","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/loan-payment":{"get":{"operationId":"calculate_loan_payment","tags":["finance"],"summary":"Loan Payment Calculator","description":"Computes the level monthly payment of a fully amortizing fixed-rate loan from principal, annual rate and term, plus the total paid and total interest over the life of the loan.\n\nUse when: You need the monthly payment or total interest cost of an auto, personal, student or other fixed-rate installment loan given its amount, APR and term.\nDo not use when: You need property tax, insurance and HOA in the payment (use mortgage-payment), or you know the payment and want the payoff time (use debt-payoff).\nFormula: i = annual_rate_percent / 1200; n = 12·term_years + term_months; monthly_payment = principal × i / (1 − (1 + i)^−n); if i = 0, monthly_payment = principal / n. total_payment = monthly_payment × n; total_interest = total_payment − principal.\nDocs: https://tttkmbb.com/finance/loan-payment.md","parameters":[{"name":"principal","in":"query","required":true,"description":"Amount borrowed.","schema":{"description":"Amount borrowed.","type":"number","maximum":1000000000000,"exclusiveMinimum":0,"examples":[200000]},"example":200000},{"name":"annual_rate_percent","in":"query","required":true,"description":"Nominal annual rate in percent; the monthly rate is this / 12. 0 is allowed for interest-free loans. Unit: %.","schema":{"description":"Nominal annual rate in percent; the monthly rate is this / 12. 0 is allowed for interest-free loans. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[6],"x-unit":"%"},"example":6},{"name":"term_years","in":"query","required":false,"description":"Loan term in years; fractional values allowed. Added to term_months when both are given. Unit: years.","schema":{"description":"Loan term in years; fractional values allowed. Added to term_months when both are given. Unit: years.","type":"number","minimum":0,"maximum":100,"examples":[30],"x-unit":"years"},"example":30},{"name":"term_months","in":"query","required":false,"description":"Additional months of term (e.g. term_months=60 alone for a 5-year auto loan). Unit: months.","schema":{"description":"Additional months of term (e.g. term_months=60 alone for a 5-year auto loan). Unit: months.","type":"integer","minimum":0,"maximum":1200,"default":0,"examples":[0],"x-unit":"months"},"example":0}],"x-calculator-id":"loan-payment","x-outputs":["monthly_payment","number_of_payments","total_payment","total_interest","payoff_summary"],"x-example":{"inputs":{"principal":200000,"annual_rate_percent":6,"term_years":30},"expected":{"monthly_payment":1199.1,"number_of_payments":360,"total_payment":431676.38,"total_interest":231676.38}},"responses":{"200":{"description":"Result with values monthly_payment, number_of_payments, total_payment, total_interest, payoff_summary","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/mortgage-payment":{"get":{"operationId":"calculate_mortgage_payment","tags":["finance"],"summary":"Mortgage Payment Calculator","description":"Computes the monthly principal-and-interest payment of a fixed-rate mortgage from home price, down payment, rate and term, then adds property tax, home insurance and HOA dues to give the full monthly housing payment and lifetime interest.\n\nUse when: You want the monthly cost of buying a home with a fixed-rate mortgage, including escrowed taxes and insurance, or the total interest over the loan.\nDo not use when: The loan is adjustable-rate or interest-only, or you only need the payment on a plain loan amount (use loan-payment).\nFormula: loan_amount = home_price − down_payment; i = annual_rate_percent / 1200; n = 12·term_years; P&I = loan_amount × i / (1 − (1 + i)^−n) (loan_amount / n if i = 0); total_monthly_payment = P&I + annual_property_tax/12 + annual_home_insurance/12 + monthly_hoa.\nDocs: https://tttkmbb.com/finance/mortgage-payment.md","parameters":[{"name":"home_price","in":"query","required":true,"description":"Purchase price of the property.","schema":{"description":"Purchase price of the property.","type":"number","maximum":1000000000000,"exclusiveMinimum":0,"examples":[250000]},"example":250000},{"name":"down_payment","in":"query","required":false,"description":"Cash paid up front; loan_amount = home_price − down_payment. For 20 % of a 250,000 home enter 50000.","schema":{"description":"Cash paid up front; loan_amount = home_price − down_payment. For 20 % of a 250,000 home enter 50000.","type":"number","minimum":0,"maximum":1000000000000,"default":0,"examples":[50000]},"example":50000},{"name":"annual_rate_percent","in":"query","required":true,"description":"Fixed note rate in percent; the monthly rate is this / 12. Unit: %.","schema":{"description":"Fixed note rate in percent; the monthly rate is this / 12. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[6],"x-unit":"%"},"example":6},{"name":"term_years","in":"query","required":false,"description":"Loan term in years (30 and 15 are the common US terms). Unit: years.","schema":{"description":"Loan term in years (30 and 15 are the common US terms). Unit: years.","type":"number","maximum":50,"exclusiveMinimum":0,"default":30,"examples":[30],"x-unit":"years"},"example":30},{"name":"annual_property_tax","in":"query","required":false,"description":"Yearly property tax; one twelfth is added to the monthly payment.","schema":{"description":"Yearly property tax; one twelfth is added to the monthly payment.","type":"number","minimum":0,"maximum":1000000000,"default":0,"examples":[3000]},"example":3000},{"name":"annual_home_insurance","in":"query","required":false,"description":"Yearly homeowners insurance premium; one twelfth is added monthly.","schema":{"description":"Yearly homeowners insurance premium; one twelfth is added monthly.","type":"number","minimum":0,"maximum":1000000000,"default":0,"examples":[1200]},"example":1200},{"name":"monthly_hoa","in":"query","required":false,"description":"Monthly homeowners-association or condo fee.","schema":{"description":"Monthly homeowners-association or condo fee.","type":"number","minimum":0,"maximum":10000000,"default":0,"examples":[0]},"example":0}],"x-calculator-id":"mortgage-payment","x-outputs":["loan_amount","loan_to_value_percent [%]","monthly_principal_and_interest","monthly_property_tax","monthly_insurance","monthly_hoa_fee","total_monthly_payment","number_of_payments","total_interest","total_of_payments","payoff_summary"],"x-example":{"inputs":{"home_price":250000,"down_payment":50000,"annual_rate_percent":6,"term_years":30,"annual_property_tax":3000,"annual_home_insurance":1200},"expected":{"loan_amount":200000,"loan_to_value_percent":80,"monthly_principal_and_interest":1199.1,"monthly_property_tax":250,"monthly_insurance":100,"total_monthly_payment":1549.1,"number_of_payments":360,"total_interest":231676.38,"total_of_payments":431676.38}},"responses":{"200":{"description":"Result with values loan_amount, loan_to_value_percent, monthly_principal_and_interest, monthly_property_tax, monthly_insurance, monthly_hoa_fee, total_monthly_payment, number_of_payments, total_interest, total_of_payments, payoff_summary","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/apy":{"get":{"operationId":"convert_apr_to_apy","tags":["finance"],"summary":"APY Calculator","description":"Converts a nominal annual rate (APR) into the effective annual yield (APY) for a given compounding frequency, and reports the periodic rate and the one-year growth of 1,000.\n\nUse when: You want to compare deposit accounts or loans quoted with different compounding frequencies, or need the effective annual rate for a nominal rate.\nDo not use when: You need a balance after several years or with deposits (use compound-interest), or the account quotes an APY already and you want the nominal rate (enter it as annual compounding).\nFormula: APY = (1 + apr_percent/100 / n)^n − 1, where n = compounding periods per year (1, 2, 4, 12, 52 or 365)\nDocs: https://tttkmbb.com/finance/apy.md","parameters":[{"name":"apr_percent","in":"query","required":true,"description":"Stated annual rate in percent before compounding; 5 means 5 %. Unit: %.","schema":{"description":"Stated annual rate in percent before compounding; 5 means 5 %. Unit: %.","type":"number","minimum":0,"maximum":1000,"examples":[5],"x-unit":"%"},"example":5},{"name":"compounding_frequency","in":"query","required":false,"description":"How often interest is credited: n = 1, 2, 4, 12, 52 or 365 periods per year. One of: annually, semiannually, quarterly, monthly, weekly, daily.","schema":{"description":"How often interest is credited: n = 1, 2, 4, 12, 52 or 365 periods per year.","type":"string","enum":["annually","semiannually","quarterly","monthly","weekly","daily"],"default":"monthly","examples":["monthly"]},"example":"monthly"}],"x-calculator-id":"apy","x-outputs":["apy_percent [%]","periodic_rate_percent [%]","periods_per_year","apy_minus_apr_percentage_points [percentage points]","balance_of_1000_after_one_year"],"x-example":{"inputs":{"apr_percent":5,"compounding_frequency":"monthly"},"expected":{"apy_percent":5.1162,"periodic_rate_percent":0.416667,"periods_per_year":12,"apy_minus_apr_percentage_points":0.1162,"balance_of_1000_after_one_year":1051.16}},"responses":{"200":{"description":"Result with values apy_percent, periodic_rate_percent, periods_per_year, apy_minus_apr_percentage_points, balance_of_1000_after_one_year","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/savings-goal":{"get":{"operationId":"calculate_savings_goal_deposit","tags":["finance"],"summary":"Savings Goal Calculator","description":"Solves for the fixed end-of-month deposit required to grow current savings to a goal amount within a given number of years at a monthly-compounded annual rate.\n\nUse when: You know the target amount, the deadline and an expected return and want the monthly saving required (emergency fund, down payment, tuition).\nDo not use when: You already know the deposit and want the resulting balance (use compound-interest or future-value), or the contributions are irregular.\nFormula: i = annual_rate_percent / 1200; m = 12·years; FV_current = current_savings × (1 + i)^m; monthly_deposit = (goal_amount − FV_current) × i / ((1 + i)^m − 1); if i = 0, monthly_deposit = (goal_amount − FV_current) / m\nDocs: https://tttkmbb.com/finance/savings-goal.md","parameters":[{"name":"goal_amount","in":"query","required":true,"description":"Target balance to reach.","schema":{"description":"Target balance to reach.","type":"number","maximum":1000000000000,"exclusiveMinimum":0,"examples":[50000]},"example":50000},{"name":"current_savings","in":"query","required":false,"description":"Amount already saved; it keeps compounding at the same rate.","schema":{"description":"Amount already saved; it keeps compounding at the same rate.","type":"number","minimum":0,"maximum":1000000000000,"default":0,"examples":[0]},"example":0},{"name":"years","in":"query","required":true,"description":"Years until the goal is needed; rounded to whole months. Unit: years.","schema":{"description":"Years until the goal is needed; rounded to whole months. Unit: years.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[10],"x-unit":"years"},"example":10},{"name":"annual_rate_percent","in":"query","required":false,"description":"Expected annual interest or return in percent, compounded monthly. Use 0 for cash under the mattress. Unit: %.","schema":{"description":"Expected annual interest or return in percent, compounded monthly. Use 0 for cash under the mattress. Unit: %.","type":"number","minimum":0,"maximum":100,"default":0,"examples":[5],"x-unit":"%"},"example":5}],"x-calculator-id":"savings-goal","x-outputs":["monthly_deposit","months","total_deposits","future_value_of_current_savings","interest_earned"],"x-example":{"inputs":{"goal_amount":50000,"years":10,"annual_rate_percent":5},"expected":{"monthly_deposit":321.99,"months":120,"total_deposits":38639.31,"interest_earned":11360.69}},"responses":{"200":{"description":"Result with values monthly_deposit, months, total_deposits, future_value_of_current_savings, interest_earned","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/future-value":{"get":{"operationId":"calculate_future_value","tags":["finance"],"summary":"Future Value Calculator","description":"Computes the future value of a present lump sum and, optionally, of a level payment made every compounding period (ordinary annuity or annuity due) at a constant rate.\n\nUse when: You need the textbook FV of a single amount and/or a series of equal payments, e.g. for finance coursework, retirement projections or comparing investment options.\nDo not use when: Payments are monthly while interest compounds at another frequency (use compound-interest), or you need to discount a future amount to today (use present-value).\nFormula: i = annual_rate_percent/100 / n_per_year; n = n_per_year × years; FV = present_value × (1 + i)^n + periodic_payment × ((1 + i)^n − 1) / i × (1 + i if payment_timing = beginning); with i = 0 the annuity part is periodic_payment × n\nDocs: https://tttkmbb.com/finance/future-value.md","parameters":[{"name":"present_value","in":"query","required":true,"description":"Lump sum invested today (0 if only payments are made).","schema":{"description":"Lump sum invested today (0 if only payments are made).","type":"number","minimum":0,"maximum":1000000000000,"examples":[1000]},"example":1000},{"name":"annual_rate_percent","in":"query","required":true,"description":"Nominal annual rate in percent; divided by the number of periods per year. Unit: %.","schema":{"description":"Nominal annual rate in percent; divided by the number of periods per year. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[8],"x-unit":"%"},"example":8},{"name":"years","in":"query","required":true,"description":"Investment horizon in years. Unit: years.","schema":{"description":"Investment horizon in years. Unit: years.","type":"number","maximum":200,"exclusiveMinimum":0,"examples":[10],"x-unit":"years"},"example":10},{"name":"compounding_frequency","in":"query","required":false,"description":"Compounding periods per year; payments (if any) are made once per period. One of: annually, semiannually, quarterly, monthly, weekly, daily.","schema":{"description":"Compounding periods per year; payments (if any) are made once per period.","type":"string","enum":["annually","semiannually","quarterly","monthly","weekly","daily"],"default":"annually","examples":["annually"]},"example":"annually"},{"name":"periodic_payment","in":"query","required":false,"description":"Equal payment made every compounding period (e.g. per month when compounding_frequency=monthly).","schema":{"description":"Equal payment made every compounding period (e.g. per month when compounding_frequency=monthly).","type":"number","minimum":0,"maximum":1000000000,"default":0,"examples":[0]},"example":0},{"name":"payment_timing","in":"query","required":false,"description":"Whether payments occur at the end or the beginning of each period. One of: end, beginning.","schema":{"description":"Whether payments occur at the end or the beginning of each period.","type":"string","enum":["end","beginning"],"default":"end","examples":["end"]},"example":"end"}],"x-calculator-id":"future-value","x-outputs":["future_value","future_value_of_lump_sum","future_value_of_payments","total_paid_in","total_interest","number_of_periods","periodic_rate_percent [%]"],"x-example":{"inputs":{"present_value":1000,"annual_rate_percent":8,"years":10,"compounding_frequency":"annually"},"expected":{"future_value":2158.92,"future_value_of_lump_sum":2158.92,"future_value_of_payments":0,"total_interest":1158.92,"number_of_periods":10}},"responses":{"200":{"description":"Result with values future_value, future_value_of_lump_sum, future_value_of_payments, total_paid_in, total_interest, number_of_periods, periodic_rate_percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/present-value":{"get":{"operationId":"calculate_present_value","tags":["finance"],"summary":"Present Value Calculator","description":"Discounts a single future amount back to today's value at a constant annual rate and compounding frequency, and reports the discount factor and the amount of discount.\n\nUse when: You need to know what a future sum is worth today, e.g. to compare a lump sum now against a payment later, or to price a zero-coupon bond.\nDo not use when: You need the value of a stream of payments (use future-value for accumulation, or a dedicated annuity/NPV tool), or you want to grow money forward (use future-value).\nFormula: i = annual_rate_percent/100 / n_per_year; n = n_per_year × years; present_value = future_value / (1 + i)^n; discount_factor = (1 + i)^−n\nDocs: https://tttkmbb.com/finance/present-value.md","parameters":[{"name":"future_value","in":"query","required":true,"description":"Amount to be received or paid in the future.","schema":{"description":"Amount to be received or paid in the future.","type":"number","minimum":0,"maximum":1000000000000,"examples":[10000]},"example":10000},{"name":"annual_rate_percent","in":"query","required":true,"description":"Nominal annual rate of return or cost of capital in percent. Unit: %.","schema":{"description":"Nominal annual rate of return or cost of capital in percent. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[5],"x-unit":"%"},"example":5},{"name":"years","in":"query","required":true,"description":"Time until the future amount is due. Unit: years.","schema":{"description":"Time until the future amount is due. Unit: years.","type":"number","maximum":200,"exclusiveMinimum":0,"examples":[10],"x-unit":"years"},"example":10},{"name":"compounding_frequency","in":"query","required":false,"description":"How often interest is credited: n = 1, 2, 4, 12, 52 or 365 periods per year. One of: annually, semiannually, quarterly, monthly, weekly, daily.","schema":{"description":"How often interest is credited: n = 1, 2, 4, 12, 52 or 365 periods per year.","type":"string","enum":["annually","semiannually","quarterly","monthly","weekly","daily"],"default":"annually","examples":["annually"]},"example":"annually"}],"x-calculator-id":"present-value","x-outputs":["present_value","discount_factor","discount_amount","number_of_periods","periodic_rate_percent [%]"],"x-example":{"inputs":{"future_value":10000,"annual_rate_percent":5,"years":10,"compounding_frequency":"annually"},"expected":{"present_value":6139.13,"discount_factor":0.613913,"discount_amount":3860.87,"number_of_periods":10}},"responses":{"200":{"description":"Result with values present_value, discount_factor, discount_amount, number_of_periods, periodic_rate_percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/roi":{"get":{"operationId":"calculate_roi","tags":["finance"],"summary":"ROI Calculator","description":"Computes the net gain and percentage return on investment from the amount invested and its final value, and the annualized (compound) return when the holding period in years is given.\n\nUse when: You want the total percentage return of an investment, project or marketing spend, optionally converted to a per-year rate for comparison across holding periods.\nDo not use when: There were multiple cash flows at different dates (that needs IRR/NPV), or you only need the growth rate between two values (use cagr).\nFormula: ROI = (final_value − initial_investment) / initial_investment × 100; annualized ROI = ((final_value / initial_investment)^(1 / years) − 1) × 100\nDocs: https://tttkmbb.com/finance/roi.md","parameters":[{"name":"initial_investment","in":"query","required":true,"description":"Total cost of the investment including fees.","schema":{"description":"Total cost of the investment including fees.","type":"number","maximum":1000000000000,"exclusiveMinimum":0,"examples":[10000]},"example":10000},{"name":"final_value","in":"query","required":true,"description":"Value at the end (sale proceeds plus any income received).","schema":{"description":"Value at the end (sale proceeds plus any income received).","type":"number","minimum":0,"maximum":1000000000000,"examples":[15000]},"example":15000},{"name":"years","in":"query","required":false,"description":"Optional length of the investment in years; enables the annualized return. Unit: years.","schema":{"description":"Optional length of the investment in years; enables the annualized return. Unit: years.","type":"number","maximum":200,"exclusiveMinimum":0,"examples":[3],"x-unit":"years"},"example":3}],"x-calculator-id":"roi","x-outputs":["net_gain","roi_percent [%]","return_multiple","annualized_roi_percent [%]"],"x-example":{"inputs":{"initial_investment":10000,"final_value":15000,"years":3},"expected":{"net_gain":5000,"roi_percent":50,"return_multiple":1.5,"annualized_roi_percent":14.47}},"responses":{"200":{"description":"Result with values net_gain, roi_percent, return_multiple, annualized_roi_percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/cagr":{"get":{"operationId":"calculate_cagr","tags":["finance"],"summary":"CAGR Calculator","description":"Computes the compound annual growth rate that turns a beginning value into an ending value over a number of years, together with the total return and growth multiple.\n\nUse when: You need a smoothed per-year growth rate for revenue, a portfolio, a population or any quantity measured at two points in time.\nDo not use when: You need to account for interim deposits or withdrawals (CAGR ignores cash flows; use a money-weighted return), or the period is under a year.\nFormula: CAGR = ((ending_value / beginning_value)^(1 / years) − 1) × 100\nDocs: https://tttkmbb.com/finance/cagr.md","parameters":[{"name":"beginning_value","in":"query","required":true,"description":"Value at the start of the period.","schema":{"description":"Value at the start of the period.","type":"number","maximum":1000000000000000,"exclusiveMinimum":0,"examples":[10000]},"example":10000},{"name":"ending_value","in":"query","required":true,"description":"Value at the end of the period.","schema":{"description":"Value at the end of the period.","type":"number","maximum":1000000000000000,"exclusiveMinimum":0,"examples":[19000]},"example":19000},{"name":"years","in":"query","required":true,"description":"Length of the period in years; fractional values allowed (18 months = 1.5). Unit: years.","schema":{"description":"Length of the period in years; fractional values allowed (18 months = 1.5). Unit: years.","type":"number","maximum":200,"exclusiveMinimum":0,"examples":[3],"x-unit":"years"},"example":3}],"x-calculator-id":"cagr","x-outputs":["cagr_percent [%]","total_return_percent [%]","growth_multiple","simple_average_annual_return_percent [%]"],"x-example":{"inputs":{"beginning_value":10000,"ending_value":19000,"years":3},"expected":{"cagr_percent":23.86,"total_return_percent":90,"growth_multiple":1.9,"simple_average_annual_return_percent":30}},"responses":{"200":{"description":"Result with values cagr_percent, total_return_percent, growth_multiple, simple_average_annual_return_percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/inflation":{"get":{"operationId":"estimate_inflation_impact","tags":["finance"],"summary":"Inflation Calculator","description":"Projects how an amount's cost rises and its purchasing power falls over a number of years at a constant annual inflation rate, using compound growth of the price level.\n\nUse when: You want to estimate what today's amount will cost in the future, or what a future sum is worth in today's money, from an assumed inflation rate.\nDo not use when: You need historical conversions between two calendar years (that requires a CPI table such as the BLS inflation calculator), or investment discounting (use present-value).\nFormula: multiplier = (1 + annual_inflation_percent/100)^years; future_cost = amount × multiplier; purchasing_power = amount / multiplier; cumulative_inflation = (multiplier − 1) × 100\nDocs: https://tttkmbb.com/finance/inflation.md","parameters":[{"name":"amount","in":"query","required":true,"description":"Amount in today's money.","schema":{"description":"Amount in today's money.","type":"number","minimum":0,"maximum":1000000000000000,"examples":[1000]},"example":1000},{"name":"annual_inflation_percent","in":"query","required":true,"description":"Assumed constant yearly inflation in percent (negative for deflation). Many central banks target about 2 %. Unit: %.","schema":{"description":"Assumed constant yearly inflation in percent (negative for deflation). Many central banks target about 2 %. Unit: %.","type":"number","minimum":-50,"maximum":200,"examples":[3],"x-unit":"%"},"example":3},{"name":"years","in":"query","required":true,"description":"Number of years ahead. Unit: years.","schema":{"description":"Number of years ahead. Unit: years.","type":"number","maximum":200,"exclusiveMinimum":0,"examples":[10],"x-unit":"years"},"example":10}],"x-calculator-id":"inflation","x-outputs":["future_cost","purchasing_power","cumulative_inflation_percent [%]","purchasing_power_loss_percent [%]","price_multiplier"],"x-example":{"inputs":{"amount":1000,"annual_inflation_percent":3,"years":10},"expected":{"future_cost":1343.92,"purchasing_power":744.09,"cumulative_inflation_percent":34.39,"purchasing_power_loss_percent":25.59,"price_multiplier":1.3439}},"responses":{"200":{"description":"Result with values future_cost, purchasing_power, cumulative_inflation_percent, purchasing_power_loss_percent, price_multiplier","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/tip":{"get":{"operationId":"calculate_tip","tags":["finance"],"summary":"Tip Calculator","description":"Computes the tip from a bill amount and tip percentage, the total including tip, and the per-person share when the bill is split evenly.\n\nUse when: You need to add a gratuity to a restaurant, delivery or service bill and optionally divide the total among several people.\nDo not use when: People pay for different items or unequal shares (use bill-split), or you need to add sales tax rather than a tip (use sales-tax).\nFormula: tip_amount = bill_amount × tip_percent / 100; total_amount = bill_amount + tip_amount; per person = value / split_between\nDocs: https://tttkmbb.com/finance/tip.md","parameters":[{"name":"bill_amount","in":"query","required":true,"description":"Amount on the bill before tip (pre- or post-tax, as you prefer to tip).","schema":{"description":"Amount on the bill before tip (pre- or post-tax, as you prefer to tip).","type":"number","minimum":0,"maximum":10000000,"examples":[85.5]},"example":85.5},{"name":"tip_percent","in":"query","required":false,"description":"Gratuity as a percent of bill_amount. US restaurant custom is 15–20 %. Unit: %.","schema":{"description":"Gratuity as a percent of bill_amount. US restaurant custom is 15–20 %. Unit: %.","type":"number","minimum":0,"maximum":100,"default":15,"examples":[18],"x-unit":"%"},"example":18},{"name":"split_between","in":"query","required":false,"description":"How many people share the bill equally.","schema":{"description":"How many people share the bill equally.","type":"integer","minimum":1,"maximum":1000,"default":1,"examples":[3]},"example":3}],"x-calculator-id":"tip","x-outputs":["tip_amount","total_amount","total_per_person","tip_per_person","bill_per_person"],"x-example":{"inputs":{"bill_amount":85.5,"tip_percent":18,"split_between":3},"expected":{"tip_amount":15.39,"total_amount":100.89,"total_per_person":33.63,"tip_per_person":5.13,"bill_per_person":28.5}},"responses":{"200":{"description":"Result with values tip_amount, total_amount, total_per_person, tip_per_person, bill_per_person","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/discount":{"get":{"operationId":"calculate_discount","tags":["finance"],"summary":"Discount Calculator","description":"Computes the final price and amount saved after a percentage discount, an optional second discount applied to the reduced price, and optional sales tax on the result.\n\nUse when: You want the sale price after a percent-off promotion, the effective rate of two stacked discounts (e.g. 20 % off plus an extra 10 %), or the checkout price with tax.\nDo not use when: You know the original and sale prices and need the percentage off (use percentage-change), or the discount is a fixed amount rather than a percent (just subtract it).\nFormula: final_price = original_price × (1 − discount_percent/100) × (1 − second_discount_percent/100); amount_saved = original_price − final_price; effective_discount = amount_saved / original_price × 100; final_price_with_tax = final_price × (1 + tax_percent/100)\nDocs: https://tttkmbb.com/finance/discount.md","parameters":[{"name":"original_price","in":"query","required":true,"description":"List price before any discount.","schema":{"description":"List price before any discount.","type":"number","minimum":0,"maximum":1000000000,"examples":[80]},"example":80},{"name":"discount_percent","in":"query","required":true,"description":"First percentage off the original price. Unit: %.","schema":{"description":"First percentage off the original price. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[25],"x-unit":"%"},"example":25},{"name":"second_discount_percent","in":"query","required":false,"description":"Optional extra percent off applied to the already-discounted price (stacked, not added). Unit: %.","schema":{"description":"Optional extra percent off applied to the already-discounted price (stacked, not added). Unit: %.","type":"number","minimum":0,"maximum":100,"default":0,"examples":[0],"x-unit":"%"},"example":0},{"name":"tax_percent","in":"query","required":false,"description":"Optional sales tax or VAT applied to the final discounted price. Unit: %.","schema":{"description":"Optional sales tax or VAT applied to the final discounted price. Unit: %.","type":"number","minimum":0,"maximum":100,"default":0,"examples":[0],"x-unit":"%"},"example":0}],"x-calculator-id":"discount","x-outputs":["final_price","amount_saved","effective_discount_percent [%]","price_after_first_discount","final_price_with_tax"],"x-example":{"inputs":{"original_price":80,"discount_percent":25},"expected":{"final_price":60,"amount_saved":20,"effective_discount_percent":25,"final_price_with_tax":60}},"responses":{"200":{"description":"Result with values final_price, amount_saved, effective_discount_percent, price_after_first_discount, final_price_with_tax","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/sales-tax":{"get":{"operationId":"calculate_sales_tax","tags":["finance"],"summary":"Sales Tax Calculator","description":"Adds sales tax at a given rate to a pre-tax price, or works backwards from a tax-inclusive total to the pre-tax price and the tax paid.\n\nUse when: You need the checkout total for a price and a combined state/local sales-tax rate, or want to know how much of a receipt total was tax.\nDo not use when: The tax is a value-added tax quoted as net/gross (use vat, which is the same arithmetic with VAT terminology), or you need the tax rate for a specific location (look it up first).\nFormula: add_tax: tax = amount × rate/100, total = amount + tax. extract_tax: pre_tax = amount / (1 + rate/100), tax = amount − pre_tax\nDocs: https://tttkmbb.com/finance/sales-tax.md","parameters":[{"name":"amount","in":"query","required":true,"description":"The pre-tax price (mode=add_tax) or the tax-inclusive total (mode=extract_tax).","schema":{"description":"The pre-tax price (mode=add_tax) or the tax-inclusive total (mode=extract_tax).","type":"number","minimum":0,"maximum":1000000000,"examples":[100]},"example":100},{"name":"tax_rate_percent","in":"query","required":true,"description":"Combined sales-tax rate in percent (state + local), e.g. 8.25. Unit: %.","schema":{"description":"Combined sales-tax rate in percent (state + local), e.g. 8.25. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[8.25],"x-unit":"%"},"example":8.25},{"name":"mode","in":"query","required":false,"description":"Whether amount excludes tax (add) or already includes it (extract). One of: add_tax, extract_tax.","schema":{"description":"Whether amount excludes tax (add) or already includes it (extract).","type":"string","enum":["add_tax","extract_tax"],"default":"add_tax","examples":["add_tax"]},"example":"add_tax"}],"x-calculator-id":"sales-tax","x-outputs":["pre_tax_amount","tax_amount","total_amount","tax_share_of_total_percent [%]"],"x-example":{"inputs":{"amount":100,"tax_rate_percent":8.25,"mode":"add_tax"},"expected":{"pre_tax_amount":100,"tax_amount":8.25,"total_amount":108.25,"tax_share_of_total_percent":7.62}},"responses":{"200":{"description":"Result with values pre_tax_amount, tax_amount, total_amount, tax_share_of_total_percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/vat":{"get":{"operationId":"calculate_vat","tags":["finance"],"summary":"VAT Calculator","description":"Adds VAT at a given rate to a net price, or removes it from a gross (VAT-inclusive) price, returning net, VAT and gross amounts.\n\nUse when: You need the VAT-inclusive price for an invoice, or the net price and VAT portion of a gross amount, at a known rate such as 20 % (UK), 19 % (Germany) or 21 % (Netherlands).\nDo not use when: You are dealing with US sales tax terminology (use sales-tax; the arithmetic is identical), or with multiple rates on one invoice (compute each line separately).\nFormula: add_vat: vat = amount × rate/100, gross = amount + vat. remove_vat: net = amount / (1 + rate/100), vat = amount − net\nDocs: https://tttkmbb.com/finance/vat.md","parameters":[{"name":"amount","in":"query","required":true,"description":"Net price (mode=add_vat) or gross VAT-inclusive price (mode=remove_vat).","schema":{"description":"Net price (mode=add_vat) or gross VAT-inclusive price (mode=remove_vat).","type":"number","minimum":0,"maximum":1000000000,"examples":[100]},"example":100},{"name":"vat_rate_percent","in":"query","required":false,"description":"VAT rate in percent; standard rates in the EU range from 17 % to 27 %. Unit: %.","schema":{"description":"VAT rate in percent; standard rates in the EU range from 17 % to 27 %. Unit: %.","type":"number","minimum":0,"maximum":100,"default":20,"examples":[20],"x-unit":"%"},"example":20},{"name":"mode","in":"query","required":false,"description":"Whether amount is net (add) or gross (remove). One of: add_vat, remove_vat.","schema":{"description":"Whether amount is net (add) or gross (remove).","type":"string","enum":["add_vat","remove_vat"],"default":"add_vat","examples":["add_vat"]},"example":"add_vat"}],"x-calculator-id":"vat","x-outputs":["net_amount","vat_amount","gross_amount","vat_fraction_of_gross"],"x-example":{"inputs":{"amount":100,"vat_rate_percent":20,"mode":"add_vat"},"expected":{"net_amount":100,"vat_amount":20,"gross_amount":120,"vat_fraction_of_gross":0.166667}},"responses":{"200":{"description":"Result with values net_amount, vat_amount, gross_amount, vat_fraction_of_gross","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/margin-markup":{"get":{"operationId":"calculate_margin_markup","tags":["finance"],"summary":"Margin and Markup Calculator","description":"Computes profit, gross margin percentage and markup percentage from a unit cost and a selling price, or derives the selling price from cost plus a target margin or markup.\n\nUse when: You are pricing a product or service and need to convert between cost, price, margin (profit as % of price) and markup (profit as % of cost).\nDo not use when: You need the sales volume that covers fixed costs (use break-even) or the tax on the price (use sales-tax / vat).\nFormula: profit = price − cost; margin_percent = profit / price × 100; markup_percent = profit / cost × 100; price from margin = cost / (1 − margin_percent/100); price from markup = cost × (1 + markup_percent/100)\nDocs: https://tttkmbb.com/finance/margin-markup.md","parameters":[{"name":"cost","in":"query","required":true,"description":"Cost of goods or unit cost.","schema":{"description":"Cost of goods or unit cost.","type":"number","maximum":1000000000000,"exclusiveMinimum":0,"examples":[50]},"example":50},{"name":"price","in":"query","required":false,"description":"Selling price. Give price, margin_percent or markup_percent (in that order of precedence).","schema":{"description":"Selling price. Give price, margin_percent or markup_percent (in that order of precedence).","type":"number","minimum":0,"maximum":1000000000000,"examples":[80]},"example":80},{"name":"margin_percent","in":"query","required":false,"description":"Desired gross margin as percent of price; used when price is omitted. Unit: %.","schema":{"description":"Desired gross margin as percent of price; used when price is omitted. Unit: %.","type":"number","minimum":-1000,"exclusiveMaximum":100,"examples":[37.5],"x-unit":"%"},"example":37.5},{"name":"markup_percent","in":"query","required":false,"description":"Desired markup as percent of cost; used when price and margin_percent are omitted. Unit: %.","schema":{"description":"Desired markup as percent of cost; used when price and margin_percent are omitted. Unit: %.","type":"number","minimum":-100,"maximum":100000,"examples":[60],"x-unit":"%"},"example":60}],"x-calculator-id":"margin-markup","x-outputs":["price","profit","margin_percent [%]","markup_percent [%]","solved_from"],"x-example":{"inputs":{"cost":50,"price":80},"expected":{"price":80,"profit":30,"margin_percent":37.5,"markup_percent":60,"solved_from":"price"}},"responses":{"200":{"description":"Result with values price, profit, margin_percent, markup_percent, solved_from","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/break-even":{"get":{"operationId":"calculate_break_even","tags":["finance"],"summary":"Break-Even Calculator","description":"Computes the contribution margin per unit and the number of units and revenue required for total revenue to equal total costs (or to reach a target profit).\n\nUse when: You are planning a product, service or event and need to know how many units must be sold at a given price to cover fixed costs, or to earn a specific profit.\nDo not use when: Price or variable cost changes with volume (needs a stepwise or non-linear model), or you only need margin/markup on one unit (use margin-markup).\nFormula: contribution_margin = price_per_unit − variable_cost_per_unit; break_even_units = (fixed_costs + target_profit) / contribution_margin; break_even_revenue = break_even_units × price_per_unit\nDocs: https://tttkmbb.com/finance/break-even.md","parameters":[{"name":"fixed_costs","in":"query","required":true,"description":"Total costs that do not change with volume over the period (rent, salaries, equipment).","schema":{"description":"Total costs that do not change with volume over the period (rent, salaries, equipment).","type":"number","minimum":0,"maximum":1000000000000,"examples":[10000]},"example":10000},{"name":"price_per_unit","in":"query","required":true,"description":"Revenue received per unit sold.","schema":{"description":"Revenue received per unit sold.","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[50]},"example":50},{"name":"variable_cost_per_unit","in":"query","required":true,"description":"Cost incurred for each unit produced or sold (materials, commissions, shipping).","schema":{"description":"Cost incurred for each unit produced or sold (materials, commissions, shipping).","type":"number","minimum":0,"maximum":1000000000,"examples":[30]},"example":30},{"name":"target_profit","in":"query","required":false,"description":"Optional profit to earn on top of covering fixed costs.","schema":{"description":"Optional profit to earn on top of covering fixed costs.","type":"number","minimum":0,"maximum":1000000000000,"default":0,"examples":[0]},"example":0}],"x-calculator-id":"break-even","x-outputs":["contribution_margin_per_unit","contribution_margin_ratio_percent [%]","break_even_units [units]","break_even_units_rounded_up [units]","break_even_revenue"],"x-example":{"inputs":{"fixed_costs":10000,"price_per_unit":50,"variable_cost_per_unit":30},"expected":{"contribution_margin_per_unit":20,"contribution_margin_ratio_percent":40,"break_even_units":500,"break_even_units_rounded_up":500,"break_even_revenue":25000}},"responses":{"200":{"description":"Result with values contribution_margin_per_unit, contribution_margin_ratio_percent, break_even_units, break_even_units_rounded_up, break_even_revenue","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/rule-of-72":{"get":{"operationId":"calculate_rule_of_72","tags":["finance"],"summary":"Rule of 72 Calculator","description":"Estimates the doubling time of an amount growing at a fixed annual rate with the Rule of 72, and compares it with the exact result ln 2 / ln(1 + r) for annual compounding and ln 2 / r for continuous compounding.\n\nUse when: You want a quick mental-math estimate of how long money (or debt, or prices) takes to double at a given annual growth rate, plus the exact figure.\nDo not use when: You need the balance after a specific number of years (use compound-interest) or the rate implied by two values (use cagr).\nFormula: rule_of_72_years = 72 / annual_rate_percent; exact_years = ln(2) / ln(1 + annual_rate_percent/100); continuous_years = ln(2) / (annual_rate_percent/100)\nDocs: https://tttkmbb.com/finance/rule-of-72.md","parameters":[{"name":"annual_rate_percent","in":"query","required":true,"description":"Annual interest, return or inflation rate in percent; 8 means 8 %. Unit: %.","schema":{"description":"Annual interest, return or inflation rate in percent; 8 means 8 %. Unit: %.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[8],"x-unit":"%"},"example":8}],"x-calculator-id":"rule-of-72","x-outputs":["rule_of_72_years [years]","exact_years [years]","continuous_years [years]","rule_error_percent [%]","years_to_triple_exact [years]"],"x-example":{"inputs":{"annual_rate_percent":8},"expected":{"rule_of_72_years":9,"exact_years":9.01,"continuous_years":8.66,"rule_error_percent":-0.07}},"responses":{"200":{"description":"Result with values rule_of_72_years, exact_years, continuous_years, rule_error_percent, years_to_triple_exact","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/debt-payoff":{"get":{"operationId":"calculate_debt_payoff","tags":["finance"],"summary":"Debt Payoff Calculator","description":"Computes how many months a fixed monthly payment takes to clear a balance charged a given APR with monthly compounding, plus the total interest paid and the size of the final payment.\n\nUse when: You know a credit-card, loan or other balance, its APR and what you can pay each month, and want the payoff date and interest cost.\nDo not use when: You know the term and need the required payment (use loan-payment), or the payment is a percentage of the balance that shrinks over time (minimum-payment schedules).\nFormula: i = annual_rate_percent / 1200. Each month: interest = balance × i; balance = balance + interest − payment (last payment = remaining balance + interest). Closed form: months = −ln(1 − i × balance / monthly_payment) / ln(1 + i), rounded up.\nDocs: https://tttkmbb.com/finance/debt-payoff.md","parameters":[{"name":"balance","in":"query","required":true,"description":"Amount owed today.","schema":{"description":"Amount owed today.","type":"number","maximum":1000000000000,"exclusiveMinimum":0,"examples":[5000]},"example":5000},{"name":"annual_rate_percent","in":"query","required":true,"description":"Annual percentage rate in percent; interest accrues monthly at APR / 12. Unit: %.","schema":{"description":"Annual percentage rate in percent; interest accrues monthly at APR / 12. Unit: %.","type":"number","minimum":0,"maximum":200,"examples":[18],"x-unit":"%"},"example":18},{"name":"monthly_payment","in":"query","required":true,"description":"Fixed amount paid at the end of each month. Must exceed the first month's interest (balance × APR / 1200).","schema":{"description":"Fixed amount paid at the end of each month. Must exceed the first month's interest (balance × APR / 1200).","type":"number","maximum":1000000000000,"exclusiveMinimum":0,"examples":[200]},"example":200}],"x-calculator-id":"debt-payoff","x-outputs":["months_to_payoff [months]","payoff_time","months_to_payoff_exact [months]","total_paid","total_interest","final_payment","first_month_interest"],"x-example":{"inputs":{"balance":5000,"annual_rate_percent":18,"monthly_payment":200},"expected":{"months_to_payoff":32,"payoff_time":"2 years 8 months","months_to_payoff_exact":31.57,"total_paid":6313.96,"total_interest":1313.96,"final_payment":113.96,"first_month_interest":75}},"responses":{"200":{"description":"Result with values months_to_payoff, payoff_time, months_to_payoff_exact, total_paid, total_interest, final_payment, first_month_interest","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/salary-converter":{"get":{"operationId":"convert_salary","tags":["finance"],"summary":"Salary Converter","description":"Converts a pay amount quoted per hour, day, week, two weeks, month or year into all the other periods, using the hours per week, days per week and paid weeks per year you specify.\n\nUse when: You need to compare an hourly wage with an annual salary, or see what a salary works out to per month, per week or per hour before tax.\nDo not use when: You need take-home pay after income tax and deductions, or overtime at a premium rate (multiply the extra hours by the premium separately).\nFormula: annual = amount × periods per year, where periods per year = hours_per_week × weeks_per_year (hourly), days_per_week × weeks_per_year (daily), weeks_per_year (weekly), weeks_per_year / 2 (biweekly), 12 (monthly) or 1 (annual); every other period = annual / its periods per year\nDocs: https://tttkmbb.com/finance/salary-converter.md","parameters":[{"name":"amount","in":"query","required":true,"description":"Gross pay for one period, before tax.","schema":{"description":"Gross pay for one period, before tax.","type":"number","minimum":0,"maximum":1000000000,"examples":[25]},"example":25},{"name":"period","in":"query","required":true,"description":"The period the entered amount refers to. One of: hourly, daily, weekly, biweekly, monthly, annual.","schema":{"description":"The period the entered amount refers to.","type":"string","enum":["hourly","daily","weekly","biweekly","monthly","annual"],"examples":["hourly"]},"example":"hourly"},{"name":"hours_per_week","in":"query","required":false,"description":"Paid hours per week (40 is standard full time in the US). Unit: hours.","schema":{"description":"Paid hours per week (40 is standard full time in the US). Unit: hours.","type":"number","maximum":168,"exclusiveMinimum":0,"default":40,"examples":[40],"x-unit":"hours"},"example":40},{"name":"days_per_week","in":"query","required":false,"description":"Paid working days per week, used for the daily rate. Unit: days.","schema":{"description":"Paid working days per week, used for the daily rate. Unit: days.","type":"number","maximum":7,"exclusiveMinimum":0,"default":5,"examples":[5],"x-unit":"days"},"example":5},{"name":"weeks_per_year","in":"query","required":false,"description":"Weeks paid per year; use 52 for salaried staff with paid leave, fewer for unpaid time off. Unit: weeks.","schema":{"description":"Weeks paid per year; use 52 for salaried staff with paid leave, fewer for unpaid time off. Unit: weeks.","type":"number","maximum":53,"exclusiveMinimum":0,"default":52,"examples":[52],"x-unit":"weeks"},"example":52}],"x-calculator-id":"salary-converter","x-outputs":["hourly","daily","weekly","biweekly","monthly","annual","hours_per_year [hours]"],"x-example":{"inputs":{"amount":25,"period":"hourly"},"expected":{"hourly":25,"daily":200,"weekly":1000,"biweekly":2000,"monthly":4333.33,"annual":52000,"hours_per_year":2080}},"responses":{"200":{"description":"Result with values hourly, daily, weekly, biweekly, monthly, annual, hours_per_year","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/bmi":{"get":{"operationId":"calculate_bmi","tags":["health"],"summary":"BMI Calculator","description":"Computes body mass index (BMI) from weight and height and classifies it with the WHO adult categories, plus the healthy weight range for that height.\n\nUse when: You need an adult's BMI, its WHO/CDC weight category, or the weight range that corresponds to a normal BMI (18.5–24.9) for a given height.\nDo not use when: The person is under 20 years old (children need age- and sex-specific BMI percentiles), or you need body-fat percentage (use body-fat) or calorie needs (use bmr / tdee).\nFormula: BMI = weight_kg / (height_cm / 100)²\nDocs: https://tttkmbb.com/health/bmi.md","parameters":[{"name":"weight_kg","in":"query","required":true,"description":"Body weight in kilograms. Unit: kg.","schema":{"description":"Body weight in kilograms. Unit: kg.","type":"number","maximum":700,"exclusiveMinimum":0,"examples":[70],"x-unit":"kg"},"example":70},{"name":"height_cm","in":"query","required":true,"description":"Standing height in centimetres. Unit: cm.","schema":{"description":"Standing height in centimetres. Unit: cm.","type":"number","minimum":50,"maximum":300,"examples":[175],"x-unit":"cm"},"example":175}],"x-calculator-id":"bmi","x-outputs":["bmi [kg/m²]","category","healthy_weight_min_kg [kg]","healthy_weight_max_kg [kg]","prime"],"x-example":{"inputs":{"weight_kg":70,"height_cm":175},"expected":{"bmi":22.86,"category":"Normal weight","healthy_weight_min_kg":56.7,"healthy_weight_max_kg":76.3,"prime":0.914}},"responses":{"200":{"description":"Result with values bmi, category, healthy_weight_min_kg, healthy_weight_max_kg, prime","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/bmr":{"get":{"operationId":"calculate_bmr","tags":["health"],"summary":"BMR Calculator","description":"Estimates basal metabolic rate (calories burned at complete rest per day) with the Mifflin-St Jeor equation, and also reports the revised Harris-Benedict estimate.\n\nUse when: You need resting daily calorie needs for an adult from sex, weight, height and age, as a base for diet or TDEE calculations.\nDo not use when: You need total daily calories including activity (use tdee), the person is a child, pregnant, or has very high muscle mass (use a body-fat based equation such as Katch-McArdle instead).\nFormula: Mifflin-St Jeor: BMR = 10·weight_kg + 6.25·height_cm − 5·age_years + 5 (male) or − 161 (female). Harris-Benedict (1984): male 88.362 + 13.397·W + 4.799·H − 5.677·A; female 447.593 + 9.247·W + 3.098·H − 4.330·A.\nDocs: https://tttkmbb.com/health/bmr.md","parameters":[{"name":"sex","in":"query","required":true,"description":"Biological sex used to select the formula coefficients. One of: male, female.","schema":{"description":"Biological sex used to select the formula coefficients.","type":"string","enum":["male","female"],"examples":["male"]},"example":"male"},{"name":"weight_kg","in":"query","required":true,"description":"Body weight in kilograms. Unit: kg.","schema":{"description":"Body weight in kilograms. Unit: kg.","type":"number","maximum":700,"exclusiveMinimum":0,"examples":[70],"x-unit":"kg"},"example":70},{"name":"height_cm","in":"query","required":true,"description":"Height in centimetres. Unit: cm.","schema":{"description":"Height in centimetres. Unit: cm.","type":"number","minimum":50,"maximum":300,"examples":[175],"x-unit":"cm"},"example":175},{"name":"age_years","in":"query","required":true,"description":"Age in years (adults only). Unit: years.","schema":{"description":"Age in years (adults only). Unit: years.","type":"number","minimum":18,"maximum":120,"examples":[30],"x-unit":"years"},"example":30}],"x-calculator-id":"bmr","x-outputs":["bmr_kcal_per_day [kcal/day]","harris_benedict_kcal_per_day [kcal/day]","bmr_kj_per_day [kJ/day]"],"x-example":{"inputs":{"sex":"male","weight_kg":70,"height_cm":175,"age_years":30},"expected":{"bmr_kcal_per_day":1649,"harris_benedict_kcal_per_day":1696,"bmr_kj_per_day":6898}},"responses":{"200":{"description":"Result with values bmr_kcal_per_day, harris_benedict_kcal_per_day, bmr_kj_per_day","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/tdee":{"get":{"operationId":"calculate_tdee","tags":["health"],"summary":"TDEE Calculator","description":"Estimates total daily energy expenditure from Mifflin-St Jeor BMR and an activity level, and derives calorie targets for maintaining, losing or gaining weight.\n\nUse when: You need daily maintenance calories for an adult, or calorie targets for a mild/standard deficit or surplus.\nDo not use when: The person is a child, pregnant or breastfeeding, or you only need the resting rate (use bmr).\nFormula: TDEE = BMR(Mifflin-St Jeor) × activity_multiplier; targets = TDEE ± 250 or ± 500 kcal/day\nDocs: https://tttkmbb.com/health/tdee.md","parameters":[{"name":"sex","in":"query","required":true,"description":"Biological sex used to select the formula coefficients. One of: male, female.","schema":{"description":"Biological sex used to select the formula coefficients.","type":"string","enum":["male","female"],"examples":["male"]},"example":"male"},{"name":"weight_kg","in":"query","required":true,"description":"Body weight in kilograms. Unit: kg.","schema":{"description":"Body weight in kilograms. Unit: kg.","type":"number","maximum":700,"exclusiveMinimum":0,"examples":[70],"x-unit":"kg"},"example":70},{"name":"height_cm","in":"query","required":true,"description":"Height in centimetres. Unit: cm.","schema":{"description":"Height in centimetres. Unit: cm.","type":"number","minimum":50,"maximum":300,"examples":[175],"x-unit":"cm"},"example":175},{"name":"age_years","in":"query","required":true,"description":"Age in years. Unit: years.","schema":{"description":"Age in years. Unit: years.","type":"number","minimum":18,"maximum":120,"examples":[30],"x-unit":"years"},"example":30},{"name":"activity_level","in":"query","required":false,"description":"Weekly exercise level; maps to the standard activity multipliers 1.2 / 1.375 / 1.55 / 1.725 / 1.9. One of: sedentary, light, moderate, very_active, extra_active.","schema":{"description":"Weekly exercise level; maps to the standard activity multipliers 1.2 / 1.375 / 1.55 / 1.725 / 1.9.","type":"string","enum":["sedentary","light","moderate","very_active","extra_active"],"default":"moderate","examples":["moderate"]},"example":"moderate"}],"x-calculator-id":"tdee","x-outputs":["bmr_kcal_per_day [kcal/day]","activity_multiplier","tdee_kcal_per_day [kcal/day]","mild_loss_kcal_per_day [kcal/day]","loss_kcal_per_day [kcal/day]","mild_gain_kcal_per_day [kcal/day]","gain_kcal_per_day [kcal/day]"],"x-example":{"inputs":{"sex":"male","weight_kg":70,"height_cm":175,"age_years":30,"activity_level":"moderate"},"expected":{"bmr_kcal_per_day":1649,"activity_multiplier":1.55,"tdee_kcal_per_day":2556,"loss_kcal_per_day":2056,"gain_kcal_per_day":3056}},"responses":{"200":{"description":"Result with values bmr_kcal_per_day, activity_multiplier, tdee_kcal_per_day, mild_loss_kcal_per_day, loss_kcal_per_day, mild_gain_kcal_per_day, gain_kcal_per_day","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/body-fat":{"get":{"operationId":"calculate_body_fat_percentage","tags":["health"],"summary":"Body Fat Calculator","description":"Estimates body-fat percentage from height and neck, waist (and hip for women) circumferences using the US Navy method, and classifies the result with ACE categories.\n\nUse when: You want a tape-measure estimate of body-fat percentage and fat/lean mass without calipers or a DEXA scan.\nDo not use when: High accuracy is required (DEXA, hydrostatic weighing or BIA are better), or the person is a child or pregnant.\nFormula: Men: %fat = 495 / (1.0324 − 0.19077·log10(waist − neck) + 0.15456·log10(height)) − 450. Women: %fat = 495 / (1.29579 − 0.35004·log10(waist + hip − neck) + 0.22100·log10(height)) − 450. All lengths in cm.\nDocs: https://tttkmbb.com/health/body-fat.md","parameters":[{"name":"sex","in":"query","required":true,"description":"Biological sex used to select the formula coefficients. One of: male, female.","schema":{"description":"Biological sex used to select the formula coefficients.","type":"string","enum":["male","female"],"examples":["male"]},"example":"male"},{"name":"height_cm","in":"query","required":true,"description":"Height in centimetres. Unit: cm.","schema":{"description":"Height in centimetres. Unit: cm.","type":"number","minimum":50,"maximum":300,"examples":[175],"x-unit":"cm"},"example":175},{"name":"waist_cm","in":"query","required":true,"description":"Waist measured at the navel (men) or narrowest point (women). Unit: cm.","schema":{"description":"Waist measured at the navel (men) or narrowest point (women). Unit: cm.","type":"number","minimum":30,"maximum":300,"examples":[85],"x-unit":"cm"},"example":85},{"name":"neck_cm","in":"query","required":true,"description":"Neck measured just below the larynx. Unit: cm.","schema":{"description":"Neck measured just below the larynx. Unit: cm.","type":"number","minimum":15,"maximum":100,"examples":[38],"x-unit":"cm"},"example":38},{"name":"hip_cm","in":"query","required":false,"description":"Hip at the widest point. Required for women, ignored for men. Unit: cm.","schema":{"description":"Hip at the widest point. Required for women, ignored for men. Unit: cm.","type":"number","minimum":30,"maximum":300,"examples":[95],"x-unit":"cm"},"example":95},{"name":"weight_kg","in":"query","required":false,"description":"Optional body weight, used to report fat mass and lean mass in kg. Unit: kg.","schema":{"description":"Optional body weight, used to report fat mass and lean mass in kg. Unit: kg.","type":"number","maximum":700,"exclusiveMinimum":0,"examples":[70],"x-unit":"kg"},"example":70}],"x-calculator-id":"body-fat","x-outputs":["body_fat_percent [%]","category","fat_mass_kg [kg]","lean_mass_kg [kg]"],"x-example":{"inputs":{"sex":"male","height_cm":175,"waist_cm":85,"neck_cm":38,"weight_kg":70},"expected":{"body_fat_percent":16.9,"category":"Fitness","fat_mass_kg":11.9,"lean_mass_kg":58.1}},"responses":{"200":{"description":"Result with values body_fat_percent, category, fat_mass_kg, lean_mass_kg","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/ideal-weight":{"get":{"operationId":"calculate_ideal_weight","tags":["health"],"summary":"Ideal Weight Calculator","description":"Computes ideal body weight from height and sex with the four common clinical formulas (Devine, Robinson, Miller, Hamwi) and the BMI 18.5–24.9 healthy range.\n\nUse when: You need a reference 'ideal' weight for an adult, e.g. for drug dosing (Devine) or general guidance, or the healthy weight range for a height.\nDo not use when: The person is under 18 or you need body-composition targets; the formulas are population averages, not individual prescriptions.\nFormula: With h = inches over 5 ft (60 in): Devine male 50 + 2.3h, female 45.5 + 2.3h; Robinson male 52 + 1.9h, female 49 + 1.7h; Miller male 56.2 + 1.41h, female 53.1 + 1.36h; Hamwi male 48 + 2.7h, female 45.5 + 2.2h. For heights under 5 ft the same slope is applied downward.\nDocs: https://tttkmbb.com/health/ideal-weight.md","parameters":[{"name":"sex","in":"query","required":true,"description":"Biological sex used to select the formula coefficients. One of: male, female.","schema":{"description":"Biological sex used to select the formula coefficients.","type":"string","enum":["male","female"],"examples":["male"]},"example":"male"},{"name":"height_cm","in":"query","required":true,"description":"Height in centimetres. Formulas are defined for heights above 152.4 cm (5 ft). Unit: cm.","schema":{"description":"Height in centimetres. Formulas are defined for heights above 152.4 cm (5 ft). Unit: cm.","type":"number","minimum":120,"maximum":260,"examples":[175],"x-unit":"cm"},"example":175}],"x-calculator-id":"ideal-weight","x-outputs":["devine_kg [kg]","robinson_kg [kg]","miller_kg [kg]","hamwi_kg [kg]","healthy_bmi_range_min_kg [kg]","healthy_bmi_range_max_kg [kg]"],"x-example":{"inputs":{"sex":"male","height_cm":175},"expected":{"devine_kg":70.5,"robinson_kg":68.9,"miller_kg":68.7,"hamwi_kg":72,"healthy_bmi_range_min_kg":56.7,"healthy_bmi_range_max_kg":76.3}},"responses":{"200":{"description":"Result with values devine_kg, robinson_kg, miller_kg, hamwi_kg, healthy_bmi_range_min_kg, healthy_bmi_range_max_kg","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/water-intake":{"get":{"operationId":"calculate_daily_water_intake","tags":["health"],"summary":"Water Intake Calculator","description":"Estimates daily drinking-water needs from body weight (35 ml per kg) plus an allowance for exercise time, reported in litres, millilitres and 240 ml cups.\n\nUse when: You want a practical daily fluid target for a healthy adult based on weight and activity.\nDo not use when: The person has kidney, heart or liver disease, is pregnant, or works in extreme heat; medical advice supersedes this rule of thumb.\nFormula: water_ml = 35 × weight_kg + 355 × (exercise_minutes / 30)\nDocs: https://tttkmbb.com/health/water-intake.md","parameters":[{"name":"weight_kg","in":"query","required":true,"description":"Body weight in kilograms. Unit: kg.","schema":{"description":"Body weight in kilograms. Unit: kg.","type":"number","maximum":700,"exclusiveMinimum":0,"examples":[70],"x-unit":"kg"},"example":70},{"name":"exercise_minutes_per_day","in":"query","required":false,"description":"Minutes of moderate exercise per day; adds about 355 ml (12 US fl oz) per 30 minutes. Unit: min.","schema":{"description":"Minutes of moderate exercise per day; adds about 355 ml (12 US fl oz) per 30 minutes. Unit: min.","type":"number","minimum":0,"maximum":600,"default":0,"examples":[30],"x-unit":"min"},"example":30}],"x-calculator-id":"water-intake","x-outputs":["water_liters_per_day [L/day]","water_ml_per_day [ml/day]","cups_per_day [cups]"],"x-example":{"inputs":{"weight_kg":70,"exercise_minutes_per_day":30},"expected":{"water_liters_per_day":2.81,"water_ml_per_day":2805,"cups_per_day":11.7}},"responses":{"200":{"description":"Result with values water_liters_per_day, water_ml_per_day, cups_per_day","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/calorie-deficit":{"get":{"operationId":"calculate_calorie_deficit_timeline","tags":["health"],"summary":"Calorie Deficit & Weight Loss Time Calculator","description":"Converts a weight change goal into total energy and the number of days and weeks required at a given daily calorie deficit or surplus, using 7,700 kcal per kilogram of body fat.\n\nUse when: You know the current and target weight and a planned daily deficit (or surplus) and want a time estimate, or want the deficit needed to hit a date.\nDo not use when: You need a medically supervised plan, the target implies more than 1 kg/week loss, or the person is a child; metabolic adaptation makes long projections approximate.\nFormula: total_kcal = |target − current| × 7700; days = total_kcal / daily_deficit; weekly_change = daily_deficit × 7 / 7700\nDocs: https://tttkmbb.com/health/calorie-deficit.md","parameters":[{"name":"current_weight_kg","in":"query","required":true,"description":"Current body weight in kilograms. Unit: kg.","schema":{"description":"Current body weight in kilograms. Unit: kg.","type":"number","maximum":700,"exclusiveMinimum":0,"examples":[80],"x-unit":"kg"},"example":80},{"name":"target_weight_kg","in":"query","required":true,"description":"Goal body weight in kilograms. Unit: kg.","schema":{"description":"Goal body weight in kilograms. Unit: kg.","type":"number","maximum":700,"exclusiveMinimum":0,"examples":[75],"x-unit":"kg"},"example":75},{"name":"daily_deficit_kcal","in":"query","required":false,"description":"Absolute daily calorie deficit (for loss) or surplus (for gain). Sign is inferred from the weight change. Unit: kcal/day.","schema":{"description":"Absolute daily calorie deficit (for loss) or surplus (for gain). Sign is inferred from the weight change. Unit: kcal/day.","type":"number","minimum":50,"maximum":2000,"default":500,"examples":[500],"x-unit":"kcal/day"},"example":500}],"x-calculator-id":"calorie-deficit","x-outputs":["weight_change_kg [kg]","total_energy_kcal [kcal]","days [days]","weeks [weeks]","weekly_change_kg [kg/week]"],"x-example":{"inputs":{"current_weight_kg":80,"target_weight_kg":75,"daily_deficit_kcal":500},"expected":{"weight_change_kg":-5,"total_energy_kcal":38500,"days":77,"weeks":11,"weekly_change_kg":-0.45}},"responses":{"200":{"description":"Result with values weight_change_kg, total_energy_kcal, days, weeks, weekly_change_kg","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/macros":{"get":{"operationId":"calculate_macros","tags":["health"],"summary":"Macro Calculator","description":"Splits a daily calorie target into grams of protein, carbohydrate and fat using a preset ratio (balanced, low-carb, high-protein, keto) or custom percentages.\n\nUse when: You have a calorie target (from tdee) and want gram targets for each macronutrient.\nDo not use when: Medical diets (renal, diabetic, PKU) are involved; those need individualised prescriptions.\nFormula: grams = calories × percent / (4 kcal/g for protein and carbohydrate, 9 kcal/g for fat)\nDocs: https://tttkmbb.com/health/macros.md","parameters":[{"name":"calories_per_day","in":"query","required":true,"description":"Daily calorie target. Unit: kcal/day.","schema":{"description":"Daily calorie target. Unit: kcal/day.","type":"number","minimum":500,"maximum":10000,"examples":[2000],"x-unit":"kcal/day"},"example":2000},{"name":"preset","in":"query","required":false,"description":"Macronutrient ratio preset. Choose custom to supply your own percentages. One of: balanced, low_carb, high_protein, keto, custom.","schema":{"description":"Macronutrient ratio preset. Choose custom to supply your own percentages.","type":"string","enum":["balanced","low_carb","high_protein","keto","custom"],"default":"balanced","examples":["balanced"]},"example":"balanced"},{"name":"protein_percent","in":"query","required":false,"description":"Only for preset=custom. Unit: %.","schema":{"description":"Only for preset=custom. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[30],"x-unit":"%"},"example":30},{"name":"carbs_percent","in":"query","required":false,"description":"Only for preset=custom. Unit: %.","schema":{"description":"Only for preset=custom. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[40],"x-unit":"%"},"example":40},{"name":"fat_percent","in":"query","required":false,"description":"Only for preset=custom. Unit: %.","schema":{"description":"Only for preset=custom. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[30],"x-unit":"%"},"example":30}],"x-calculator-id":"macros","x-outputs":["protein_g [g/day]","carbs_g [g/day]","fat_g [g/day]","ratio"],"x-example":{"inputs":{"calories_per_day":2000,"preset":"balanced"},"expected":{"protein_g":150,"carbs_g":200,"fat_g":67,"ratio":"30/40/30"}},"responses":{"200":{"description":"Result with values protein_g, carbs_g, fat_g, ratio","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/heart-rate-zones":{"get":{"operationId":"calculate_heart_rate_zones","tags":["health"],"summary":"Heart Rate Zone Calculator","description":"Estimates maximum heart rate from age (Tanaka or Fox formula) and computes the five training zones, using the Karvonen heart-rate-reserve method when resting heart rate is supplied.\n\nUse when: You need training heart-rate ranges (zones 1–5) for an adult from age, optionally refined by resting heart rate.\nDo not use when: The person takes heart-rate-limiting medication (e.g. beta blockers) or has a measured maximum heart rate from a test (use that instead of an age formula).\nFormula: max_hr = 208 − 0.7·age (Tanaka) or 220 − age (Fox). Percent-of-max: zone = max_hr × %. Karvonen: target = (max_hr − resting) × % + resting. Zones: 50–60, 60–70, 70–80, 80–90, 90–100%.\nDocs: https://tttkmbb.com/health/heart-rate-zones.md","parameters":[{"name":"age_years","in":"query","required":true,"description":"Age in years. Unit: years.","schema":{"description":"Age in years. Unit: years.","type":"number","minimum":5,"maximum":120,"examples":[30],"x-unit":"years"},"example":30},{"name":"resting_heart_rate","in":"query","required":false,"description":"Optional resting heart rate; when given, zones use the Karvonen (heart-rate reserve) method. Unit: bpm.","schema":{"description":"Optional resting heart rate; when given, zones use the Karvonen (heart-rate reserve) method. Unit: bpm.","type":"number","minimum":25,"maximum":150,"examples":[60],"x-unit":"bpm"},"example":60},{"name":"max_hr_formula","in":"query","required":false,"description":"Formula for maximum heart rate. Tanaka (2001) is more accurate across ages than the classic 220 − age. One of: tanaka, fox.","schema":{"description":"Formula for maximum heart rate. Tanaka (2001) is more accurate across ages than the classic 220 − age.","type":"string","enum":["tanaka","fox"],"default":"tanaka","examples":["tanaka"]},"example":"tanaka"}],"x-calculator-id":"heart-rate-zones","x-outputs":["max_heart_rate [bpm]","method","zones"],"x-example":{"inputs":{"age_years":30},"expected":{"max_heart_rate":187,"method":"percent_of_max"}},"responses":{"200":{"description":"Result with values max_heart_rate, method, zones","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/pregnancy-due-date":{"get":{"operationId":"calculate_pregnancy_due_date","tags":["health"],"summary":"Pregnancy Due Date Calculator","description":"Estimates the due date, conception date and current gestational age from the first day of the last menstrual period, adjusting for cycle length (Naegele's rule).\n\nUse when: You know the first day of the last period and want the estimated due date, trimester dates or gestational age on a given date.\nDo not use when: Cycles are very irregular, the LMP is unknown, or an ultrasound dating is available (ultrasound dating in the first trimester is more accurate and takes precedence).\nFormula: due_date = LMP + 280 days + (cycle_length − 28); conception ≈ LMP + 14 + (cycle_length − 28); gestational_age = as_of_date − LMP\nDocs: https://tttkmbb.com/health/pregnancy-due-date.md","parameters":[{"name":"last_period_date","in":"query","required":true,"description":"First day of the last menstrual period (ISO date YYYY-MM-DD).","schema":{"description":"First day of the last menstrual period (ISO date YYYY-MM-DD).","type":"string","format":"date","examples":["2026-01-01"]},"example":"2026-01-01"},{"name":"cycle_length_days","in":"query","required":false,"description":"Average menstrual cycle length; the due date shifts by (cycle − 28) days. Unit: days.","schema":{"description":"Average menstrual cycle length; the due date shifts by (cycle − 28) days. Unit: days.","type":"integer","minimum":20,"maximum":45,"default":28,"examples":[28],"x-unit":"days"},"example":28},{"name":"as_of_date","in":"query","required":false,"description":"Optional date on which to report gestational age (weeks + days). Omit to skip.","schema":{"description":"Optional date on which to report gestational age (weeks + days). Omit to skip.","type":"string","format":"date","examples":["2026-04-15"]},"example":"2026-04-15"}],"x-calculator-id":"pregnancy-due-date","x-outputs":["due_date","conception_date_estimate","second_trimester_start","third_trimester_start","gestational_age","gestational_days [days]"],"x-example":{"inputs":{"last_period_date":"2026-01-01","cycle_length_days":28,"as_of_date":"2026-04-15"},"expected":{"due_date":"2026-10-08","conception_date_estimate":"2026-01-15","second_trimester_start":"2026-04-02","third_trimester_start":"2026-07-09","gestational_age":"14 weeks 6 days","gestational_days":104}},"responses":{"200":{"description":"Result with values due_date, conception_date_estimate, second_trimester_start, third_trimester_start, gestational_age, gestational_days","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/ovulation":{"get":{"operationId":"calculate_ovulation_date","tags":["health"],"summary":"Ovulation Calculator","description":"Estimates the ovulation date, the six-day fertile window and the next period start from the first day of the last period and the average cycle length.\n\nUse when: You want to estimate the most fertile days of a regular menstrual cycle.\nDo not use when: Cycles vary by more than a few days, hormonal contraception is used, or you need contraception (calendar estimates are not reliable for preventing pregnancy).\nFormula: next_period = LMP + cycle_length; ovulation = next_period − luteal_phase; fertile_window = ovulation − 5 … ovulation\nDocs: https://tttkmbb.com/health/ovulation.md","parameters":[{"name":"last_period_date","in":"query","required":true,"description":"First day of the most recent period (YYYY-MM-DD).","schema":{"description":"First day of the most recent period (YYYY-MM-DD).","type":"string","format":"date","examples":["2026-09-01"]},"example":"2026-09-01"},{"name":"cycle_length_days","in":"query","required":false,"description":"Average number of days from one period start to the next. Unit: days.","schema":{"description":"Average number of days from one period start to the next. Unit: days.","type":"integer","minimum":20,"maximum":45,"default":28,"examples":[28],"x-unit":"days"},"example":28},{"name":"luteal_phase_days","in":"query","required":false,"description":"Days from ovulation to the next period; 14 is the population average. Unit: days.","schema":{"description":"Days from ovulation to the next period; 14 is the population average. Unit: days.","type":"integer","minimum":10,"maximum":18,"default":14,"examples":[14],"x-unit":"days"},"example":14}],"x-calculator-id":"ovulation","x-outputs":["ovulation_date","fertile_window_start","fertile_window_end","next_period_date","pregnancy_test_date"],"x-example":{"inputs":{"last_period_date":"2026-09-01","cycle_length_days":28},"expected":{"ovulation_date":"2026-09-15","fertile_window_start":"2026-09-10","fertile_window_end":"2026-09-15","next_period_date":"2026-09-29"}},"responses":{"200":{"description":"Result with values ovulation_date, fertile_window_start, fertile_window_end, next_period_date, pregnancy_test_date","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/waist-to-height-ratio":{"get":{"operationId":"calculate_waist_to_height_ratio","tags":["health"],"summary":"Waist-to-Height Ratio Calculator","description":"Divides waist circumference by height and classifies the ratio using the 'keep your waist to less than half your height' guidance (NICE 2022).\n\nUse when: You want a simple central-adiposity screen that predicts cardiometabolic risk better than BMI alone.\nDo not use when: The person is under 18 or pregnant.\nFormula: ratio = waist_cm / height_cm\nDocs: https://tttkmbb.com/health/waist-to-height-ratio.md","parameters":[{"name":"waist_cm","in":"query","required":true,"description":"Waist measured midway between the lowest rib and the top of the hip bone. Unit: cm.","schema":{"description":"Waist measured midway between the lowest rib and the top of the hip bone. Unit: cm.","type":"number","minimum":30,"maximum":300,"examples":[85],"x-unit":"cm"},"example":85},{"name":"height_cm","in":"query","required":true,"description":"Height in centimetres. Unit: cm.","schema":{"description":"Height in centimetres. Unit: cm.","type":"number","minimum":50,"maximum":300,"examples":[175],"x-unit":"cm"},"example":175}],"x-calculator-id":"waist-to-height-ratio","x-outputs":["ratio","category","max_healthy_waist_cm [cm]"],"x-example":{"inputs":{"waist_cm":85,"height_cm":175},"expected":{"ratio":0.486,"category":"Healthy","max_healthy_waist_cm":87.5}},"responses":{"200":{"description":"Result with values ratio, category, max_healthy_waist_cm","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/lean-body-mass":{"get":{"operationId":"calculate_lean_body_mass","tags":["health"],"summary":"Lean Body Mass Calculator","description":"Estimates lean body mass (fat-free mass) from weight, height and sex with the Boer (1984), James (1976) and Hume (1966) formulas.\n\nUse when: You need fat-free mass for drug dosing, nutrition planning or as a body-composition reference without a scan.\nDo not use when: You have measured body-fat percentage (lean mass = weight × (1 − body fat) is then more accurate) or the person is a child.\nFormula: Boer: male 0.407·W + 0.267·H − 19.2, female 0.252·W + 0.473·H − 48.3. James: male 1.1·W − 128·(W/H)², female 1.07·W − 148·(W/H)². Hume: male 0.32810·W + 0.33929·H − 29.5336, female 0.29569·W + 0.41813·H − 43.2933. W in kg, H in cm.\nDocs: https://tttkmbb.com/health/lean-body-mass.md","parameters":[{"name":"sex","in":"query","required":true,"description":"Biological sex used to select the formula coefficients. One of: male, female.","schema":{"description":"Biological sex used to select the formula coefficients.","type":"string","enum":["male","female"],"examples":["male"]},"example":"male"},{"name":"weight_kg","in":"query","required":true,"description":"Body weight in kilograms. Unit: kg.","schema":{"description":"Body weight in kilograms. Unit: kg.","type":"number","maximum":700,"exclusiveMinimum":0,"examples":[70],"x-unit":"kg"},"example":70},{"name":"height_cm","in":"query","required":true,"description":"Height in centimetres. Unit: cm.","schema":{"description":"Height in centimetres. Unit: cm.","type":"number","minimum":50,"maximum":300,"examples":[175],"x-unit":"cm"},"example":175}],"x-calculator-id":"lean-body-mass","x-outputs":["boer_kg [kg]","james_kg [kg]","hume_kg [kg]","boer_body_fat_percent [%]"],"x-example":{"inputs":{"sex":"male","weight_kg":70,"height_cm":175},"expected":{"boer_kg":56,"james_kg":56.5,"hume_kg":52.8,"boer_body_fat_percent":20}},"responses":{"200":{"description":"Result with values boer_kg, james_kg, hume_kg, boer_body_fat_percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/protein-intake":{"get":{"operationId":"calculate_protein_intake","tags":["health"],"summary":"Protein Intake Calculator","description":"Recommends a daily protein range in grams from body weight and goal (sedentary RDA 0.8 g/kg up to 1.6–2.2 g/kg for muscle gain or fat loss), based on the ISSN position stand.\n\nUse when: You want a protein target in grams per day for an adult given their activity or goal.\nDo not use when: Kidney disease or other medical conditions limit protein; consult a clinician.\nFormula: protein_g = weight_kg × g_per_kg (range depends on goal)\nDocs: https://tttkmbb.com/health/protein-intake.md","parameters":[{"name":"weight_kg","in":"query","required":true,"description":"Body weight in kilograms. Unit: kg.","schema":{"description":"Body weight in kilograms. Unit: kg.","type":"number","maximum":700,"exclusiveMinimum":0,"examples":[70],"x-unit":"kg"},"example":70},{"name":"goal","in":"query","required":false,"description":"Determines the g/kg range applied. One of: sedentary, active, endurance, muscle_gain, fat_loss, older_adult.","schema":{"description":"Determines the g/kg range applied.","type":"string","enum":["sedentary","active","endurance","muscle_gain","fat_loss","older_adult"],"default":"active","examples":["active"]},"example":"active"}],"x-calculator-id":"protein-intake","x-outputs":["protein_min_g [g/day]","protein_max_g [g/day]","protein_recommended_g [g/day]","g_per_kg_range"],"x-example":{"inputs":{"weight_kg":70,"goal":"sedentary"},"expected":{"protein_min_g":56,"protein_max_g":56,"protein_recommended_g":56,"g_per_kg_range":"0.8–0.8"}},"responses":{"200":{"description":"Result with values protein_min_g, protein_max_g, protein_recommended_g, g_per_kg_range","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/blood-pressure":{"get":{"operationId":"classify_blood_pressure","tags":["health"],"summary":"Blood Pressure Category Calculator","description":"Classifies a systolic/diastolic blood pressure reading into the ACC/AHA 2017 categories (normal, elevated, stage 1, stage 2, hypertensive crisis) and reports mean arterial and pulse pressure.\n\nUse when: You have a resting blood-pressure reading and want the standard adult category plus MAP and pulse pressure.\nDo not use when: Diagnosing hypertension (requires repeated readings over time) or for children and pregnant women, who use different thresholds.\nFormula: Normal <120 and <80; Elevated 120–129 and <80; Stage 1: 130–139 or 80–89; Stage 2: ≥140 or ≥90; Crisis: >180 and/or >120. MAP = DBP + (SBP − DBP)/3.\nDocs: https://tttkmbb.com/health/blood-pressure.md","parameters":[{"name":"systolic_mmhg","in":"query","required":true,"description":"Upper reading. Unit: mmHg.","schema":{"description":"Upper reading. Unit: mmHg.","type":"number","minimum":50,"maximum":300,"examples":[118],"x-unit":"mmHg"},"example":118},{"name":"diastolic_mmhg","in":"query","required":true,"description":"Lower reading. Unit: mmHg.","schema":{"description":"Lower reading. Unit: mmHg.","type":"number","minimum":20,"maximum":200,"examples":[76],"x-unit":"mmHg"},"example":76}],"x-calculator-id":"blood-pressure","x-outputs":["category","mean_arterial_pressure_mmhg [mmHg]","pulse_pressure_mmhg [mmHg]"],"x-example":{"inputs":{"systolic_mmhg":118,"diastolic_mmhg":76},"expected":{"category":"Normal","mean_arterial_pressure_mmhg":90,"pulse_pressure_mmhg":42}},"responses":{"200":{"description":"Result with values category, mean_arterial_pressure_mmhg, pulse_pressure_mmhg","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/body-surface-area":{"get":{"operationId":"calculate_body_surface_area","tags":["health"],"summary":"Body Surface Area Calculator","description":"Computes body surface area in square metres from height and weight using the Mosteller and Du Bois formulas, as used for chemotherapy and other weight-independent dosing.\n\nUse when: You need BSA for drug dosing, cardiac index or physiological normalisation.\nDo not use when: You need body composition or BMI; BSA does not indicate fatness.\nFormula: Mosteller: BSA = √(H·W / 3600). Du Bois: BSA = 0.007184 · W^0.425 · H^0.725. Haycock: BSA = 0.024265 · W^0.5378 · H^0.3964. H in cm, W in kg.\nDocs: https://tttkmbb.com/health/body-surface-area.md","parameters":[{"name":"weight_kg","in":"query","required":true,"description":"Body weight in kilograms. Unit: kg.","schema":{"description":"Body weight in kilograms. Unit: kg.","type":"number","maximum":700,"exclusiveMinimum":0,"examples":[70],"x-unit":"kg"},"example":70},{"name":"height_cm","in":"query","required":true,"description":"Height in centimetres. Unit: cm.","schema":{"description":"Height in centimetres. Unit: cm.","type":"number","minimum":30,"maximum":300,"examples":[175],"x-unit":"cm"},"example":175}],"x-calculator-id":"body-surface-area","x-outputs":["bsa_mosteller_m2 [m²]","bsa_dubois_m2 [m²]","bsa_haycock_m2 [m²]"],"x-example":{"inputs":{"weight_kg":70,"height_cm":175},"expected":{"bsa_mosteller_m2":1.845,"bsa_dubois_m2":1.847,"bsa_haycock_m2":1.85}},"responses":{"200":{"description":"Result with values bsa_mosteller_m2, bsa_dubois_m2, bsa_haycock_m2","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/running-pace":{"get":{"operationId":"calculate_running_pace","tags":["fitness"],"summary":"Running Pace Calculator","description":"Computes running pace in min/km and min/mile and speed in km/h and mph from a distance and elapsed time, and projects the finish time for 5 km, 10 km, half marathon and marathon at that constant pace.\n\nUse when: You know a distance and the time it took (or a target time) and need the pace, the equivalent speed, or the time that pace gives over standard race distances.\nDo not use when: You want a realistic prediction of a longer race from a shorter one (pace slows with distance; use race-time-predictor), or you only need to convert between pace and speed units (use pace-converter).\nFormula: pace_s_per_km = time_seconds / distance_km; pace_s_per_mile = pace_s_per_km × 1.609344; speed_kmh = 3600 / pace_s_per_km; speed_mph = speed_kmh / 1.609344; time(D) = pace_s_per_km × D for D = 5, 10, 21.0975, 42.195 km\nDocs: https://tttkmbb.com/fitness/running-pace.md","parameters":[{"name":"distance","in":"query","required":true,"description":"Distance covered, in the unit given by distance_unit.","schema":{"description":"Distance covered, in the unit given by distance_unit.","type":"number","maximum":5000,"exclusiveMinimum":0,"examples":[10]},"example":10},{"name":"distance_unit","in":"query","required":false,"description":"Unit of the distance input. One of: km, mi.","schema":{"description":"Unit of the distance input.","type":"string","enum":["km","mi"],"default":"km","examples":["km"]},"example":"km"},{"name":"time","in":"query","required":true,"description":"Elapsed time as h:mm:ss (1:45:00), mm:ss (50:00) or plain minutes (50).","schema":{"description":"Elapsed time as h:mm:ss (1:45:00), mm:ss (50:00) or plain minutes (50).","type":"string","examples":["50:00"]},"example":"50:00"}],"x-calculator-id":"running-pace","x-outputs":["pace_min_per_km [min:sec/km]","pace_min_per_mile [min:sec/mi]","pace_seconds_per_km [s/km]","speed_kmh [km/h]","speed_mph [mph]","distance_km [km]","time_5k [h:mm:ss]","time_10k [h:mm:ss]","time_half_marathon [h:mm:ss]","time_marathon [h:mm:ss]"],"x-example":{"inputs":{"distance":10,"distance_unit":"km","time":"50:00"},"expected":{"pace_min_per_km":"5:00","pace_min_per_mile":"8:03","pace_seconds_per_km":300,"speed_kmh":12,"speed_mph":7.46,"time_5k":"0:25:00","time_half_marathon":"1:45:29","time_marathon":"3:30:59"}},"responses":{"200":{"description":"Result with values pace_min_per_km, pace_min_per_mile, pace_seconds_per_km, speed_kmh, speed_mph, distance_km, time_5k, time_10k, time_half_marathon, time_marathon","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/race-time-predictor":{"get":{"operationId":"predict_race_time","tags":["fitness"],"summary":"Race Time Predictor","description":"Predicts finish times for 5 km, 10 km, half marathon and marathon from one known race result using Riegel's endurance formula T2 = T1 × (D2/D1)^1.06, with the corresponding paces.\n\nUse when: You have a recent race time (or time trial) and want equivalent-effort predictions for other standard distances, e.g. to set a marathon goal from a half-marathon result.\nDo not use when: You only need the pace or constant-pace splits of a run (use running-pace), the known effort was a trail or very hilly race, or it was shorter than about 1.5 km or longer than a marathon.\nFormula: T2 = T1 × (D2 / D1)^exponent, exponent = 1.06 (Riegel 1981); pace = T2 / D2\nDocs: https://tttkmbb.com/fitness/race-time-predictor.md","parameters":[{"name":"distance","in":"query","required":true,"description":"Distance of the race you already ran, in distance_unit.","schema":{"description":"Distance of the race you already ran, in distance_unit.","type":"number","maximum":500,"exclusiveMinimum":0,"examples":[10]},"example":10},{"name":"distance_unit","in":"query","required":false,"description":"Unit of the distance input. One of: km, mi.","schema":{"description":"Unit of the distance input.","type":"string","enum":["km","mi"],"default":"km","examples":["km"]},"example":"km"},{"name":"time","in":"query","required":true,"description":"Finish time of the known race as h:mm:ss, mm:ss or minutes.","schema":{"description":"Finish time of the known race as h:mm:ss, mm:ss or minutes.","type":"string","examples":["50:00"]},"example":"50:00"},{"name":"exponent","in":"query","required":false,"description":"Riegel's exponent; 1.06 fits elite and well-trained runners, 1.07–1.10 is often more realistic for recreational marathoners.","schema":{"description":"Riegel's exponent; 1.06 fits elite and well-trained runners, 1.07–1.10 is often more realistic for recreational marathoners.","type":"number","minimum":1,"maximum":1.3,"default":1.06,"examples":[1.06]},"example":1.06}],"x-calculator-id":"race-time-predictor","x-outputs":["predicted_5k [h:mm:ss]","predicted_10k [h:mm:ss]","predicted_half_marathon [h:mm:ss]","predicted_marathon [h:mm:ss]","predictions"],"x-example":{"inputs":{"distance":10,"distance_unit":"km","time":"50:00"},"expected":{"predicted_5k":"0:23:59","predicted_10k":"0:50:00","predicted_half_marathon":"1:50:19","predicted_marathon":"3:50:01"}},"responses":{"200":{"description":"Result with values predicted_5k, predicted_10k, predicted_half_marathon, predicted_marathon, predictions","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/calories-burned":{"get":{"operationId":"estimate_calories_burned","tags":["fitness"],"summary":"Calories Burned Calculator","description":"Estimates the calories burned during an activity from body weight, duration and the activity's MET value from the 2011 Compendium of Physical Activities, using the ACSM metabolic equation kcal/min = MET × 3.5 × kg / 200.\n\nUse when: You need an estimate of energy expenditure for a workout, sport or chore of known duration for a person of known weight.\nDo not use when: You need total daily calorie needs (use tdee) or resting expenditure (use bmr); MET values are population averages and ignore fitness level, terrain and intensity within a category.\nFormula: kcal_per_minute = MET × 3.5 × weight_kg / 200; calories_kcal = kcal_per_minute × duration_minutes\nDocs: https://tttkmbb.com/fitness/calories-burned.md","parameters":[{"name":"weight_kg","in":"query","required":true,"description":"Body weight in kilograms. Unit: kg.","schema":{"description":"Body weight in kilograms. Unit: kg.","type":"number","maximum":700,"exclusiveMinimum":0,"examples":[70],"x-unit":"kg"},"example":70},{"name":"duration_minutes","in":"query","required":true,"description":"Duration of the activity in minutes. Unit: min.","schema":{"description":"Duration of the activity in minutes. Unit: min.","type":"number","maximum":1440,"exclusiveMinimum":0,"examples":[30],"x-unit":"min"},"example":30},{"name":"activity","in":"query","required":true,"description":"Activity and intensity; each maps to a MET value from the 2011 Compendium of Physical Activities. One of: walking_3_5_mph, running_6_mph, running_8_mph, cycling_moderate, swimming_laps_moderate, weight_training, yoga, hiking, jump_rope, rowing_moderate, elliptical, basketball, soccer, tennis, dancing, housework.","schema":{"description":"Activity and intensity; each maps to a MET value from the 2011 Compendium of Physical Activities.","type":"string","enum":["walking_3_5_mph","running_6_mph","running_8_mph","cycling_moderate","swimming_laps_moderate","weight_training","yoga","hiking","jump_rope","rowing_moderate","elliptical","basketball","soccer","tennis","dancing","housework"],"examples":["running_6_mph"]},"example":"running_6_mph"}],"x-calculator-id":"calories-burned","x-outputs":["calories_kcal [kcal]","kcal_per_minute [kcal/min]","kcal_per_hour [kcal/h]","met [MET]","activity_label"],"x-example":{"inputs":{"weight_kg":70,"duration_minutes":30,"activity":"running_6_mph"},"expected":{"calories_kcal":360,"kcal_per_minute":12.01,"kcal_per_hour":720,"met":9.8}},"responses":{"200":{"description":"Result with values calories_kcal, kcal_per_minute, kcal_per_hour, met, activity_label","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/one-rep-max":{"get":{"operationId":"estimate_one_rep_max","tags":["fitness"],"summary":"One-Rep Max Calculator","description":"Estimates the one-repetition maximum from a weight lifted for 2–12 repetitions using the Epley, Brzycki and Lombardi equations, reports their average, and lists training loads at 95 % to 70 % of that 1RM.\n\nUse when: You want to estimate maximal strength or program training percentages without attempting a true single-rep maximum.\nDo not use when: The set was more than 12 repetitions (prediction error grows quickly) or was not taken close to failure; use a heavier, lower-rep set instead.\nFormula: Epley: 1RM = w × (1 + reps/30); Brzycki: 1RM = w × 36 / (37 − reps); Lombardi: 1RM = w × reps^0.10; one_rep_max = (Epley + Brzycki + Lombardi) / 3; load_p = one_rep_max × p / 100\nDocs: https://tttkmbb.com/fitness/one-rep-max.md","parameters":[{"name":"weight_lifted","in":"query","required":true,"description":"Load lifted for the set, in any unit; outputs use the same unit. Unit: kg or lb.","schema":{"description":"Load lifted for the set, in any unit; outputs use the same unit. Unit: kg or lb.","type":"number","maximum":2000,"exclusiveMinimum":0,"examples":[100],"x-unit":"kg or lb"},"example":100},{"name":"reps","in":"query","required":true,"description":"Repetitions completed with that load, ideally to (near) failure. Unit: reps.","schema":{"description":"Repetitions completed with that load, ideally to (near) failure. Unit: reps.","type":"integer","minimum":2,"maximum":12,"examples":[5],"x-unit":"reps"},"example":5}],"x-calculator-id":"one-rep-max","x-outputs":["one_rep_max","epley","brzycki","lombardi","percentages"],"x-example":{"inputs":{"weight_lifted":100,"reps":5},"expected":{"epley":116.7,"brzycki":112.5,"lombardi":117.5,"one_rep_max":115.5,"percentages":[{"percent":95,"load":109.8},{"percent":90,"load":104},{"percent":85,"load":98.2},{"percent":80,"load":92.4},{"percent":75,"load":86.7},{"percent":70,"load":80.9}]}},"responses":{"200":{"description":"Result with values one_rep_max, epley, brzycki, lombardi, percentages","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/vo2-max":{"get":{"operationId":"estimate_vo2_max","tags":["fitness"],"summary":"VO2 Max Calculator","description":"Estimates maximal oxygen uptake (VO2max, ml/kg/min) from the distance covered in the Cooper 12-minute run test, and/or from the ratio of maximum to resting heart rate (Uth et al. 2004).\n\nUse when: You have a 12-minute run distance or resting and maximum heart rates and want a field estimate of aerobic fitness.\nDo not use when: A laboratory or wearable-measured VO2max is available, or the person cannot run continuously for 12 minutes; the heart-rate method also requires a true (measured) maximum heart rate.\nFormula: Cooper: VO2max = (distance_m − 504.9) / 44.73; heart-rate ratio: VO2max = 15.3 × max_heart_rate / resting_heart_rate (ml/kg/min)\nDocs: https://tttkmbb.com/fitness/vo2-max.md","parameters":[{"name":"distance_m","in":"query","required":false,"description":"Distance covered in 12 minutes of running (Cooper test). Omit if using heart rates only. Unit: m.","schema":{"description":"Distance covered in 12 minutes of running (Cooper test). Omit if using heart rates only. Unit: m.","type":"number","minimum":600,"maximum":6000,"examples":[2800],"x-unit":"m"},"example":2800},{"name":"resting_heart_rate","in":"query","required":false,"description":"Resting heart rate, measured on waking. Needed together with max_heart_rate for the heart-rate ratio method. Unit: bpm.","schema":{"description":"Resting heart rate, measured on waking. Needed together with max_heart_rate for the heart-rate ratio method. Unit: bpm.","type":"number","minimum":25,"maximum":150,"examples":[60],"x-unit":"bpm"},"example":60},{"name":"max_heart_rate","in":"query","required":false,"description":"Measured maximum heart rate (an age formula such as 220 − age adds error). Unit: bpm.","schema":{"description":"Measured maximum heart rate (an age formula such as 220 − age adds error). Unit: bpm.","type":"number","minimum":80,"maximum":250,"examples":[180],"x-unit":"bpm"},"example":180}],"x-calculator-id":"vo2-max","x-outputs":["vo2max_ml_kg_min [ml/kg/min]","method","vo2max_cooper_ml_kg_min [ml/kg/min]","vo2max_heart_rate_ratio_ml_kg_min [ml/kg/min]"],"x-example":{"inputs":{"distance_m":2800},"expected":{"vo2max_ml_kg_min":51.3,"vo2max_cooper_ml_kg_min":51.3,"method":"Cooper 12-minute run test"}},"responses":{"200":{"description":"Result with values vo2max_ml_kg_min, method, vo2max_cooper_ml_kg_min, vo2max_heart_rate_ratio_ml_kg_min","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/steps-to-distance":{"get":{"operationId":"convert_steps_to_distance","tags":["fitness"],"summary":"Steps to Distance Calculator","description":"Converts a pedometer step count into distance using a measured stride length, or a walking stride estimated from height (stride ≈ 0.414 × height).\n\nUse when: You have a daily step count and want to know the distance walked in kilometres and miles, or the number of steps in a kilometre or mile.\nDo not use when: The steps were mostly running (running strides are considerably longer; enter a measured stride_length_m instead) or you need calories (use calories-burned with the walking activity).\nFormula: stride_length_m = 0.414 × height_cm / 100 (unless measured); distance_m = steps × stride_length_m; distance_km = distance_m / 1000; distance_mi = distance_km / 1.609344\nDocs: https://tttkmbb.com/fitness/steps-to-distance.md","parameters":[{"name":"steps","in":"query","required":true,"description":"Number of steps taken. Unit: steps.","schema":{"description":"Number of steps taken. Unit: steps.","type":"integer","minimum":0,"maximum":10000000,"examples":[10000],"x-unit":"steps"},"example":10000},{"name":"height_cm","in":"query","required":false,"description":"Height, used to estimate a walking stride of 0.414 × height when stride_length_m is not given. Unit: cm.","schema":{"description":"Height, used to estimate a walking stride of 0.414 × height when stride_length_m is not given. Unit: cm.","type":"number","minimum":50,"maximum":300,"examples":[175],"x-unit":"cm"},"example":175},{"name":"stride_length_m","in":"query","required":false,"description":"Measured length of one step in metres (heel to heel). Overrides the height estimate. Unit: m.","schema":{"description":"Measured length of one step in metres (heel to heel). Overrides the height estimate. Unit: m.","type":"number","maximum":3,"exclusiveMinimum":0,"examples":[0.75],"x-unit":"m"},"example":0.75}],"x-calculator-id":"steps-to-distance","x-outputs":["distance_km [km]","distance_mi [mi]","distance_m [m]","stride_length_m [m]","steps_per_km [steps/km]","steps_per_mile [steps/mi]"],"x-example":{"inputs":{"steps":10000,"height_cm":175},"expected":{"stride_length_m":0.725,"distance_km":7.245,"distance_mi":4.502,"distance_m":7245,"steps_per_km":1380}},"responses":{"200":{"description":"Result with values distance_km, distance_mi, distance_m, stride_length_m, steps_per_km, steps_per_mile","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/swim-pace":{"get":{"operationId":"calculate_swim_pace","tags":["fitness"],"summary":"Swim Pace Calculator","description":"Computes swimming pace per 100 metres and per 100 yards, speed in m/s and km/h, and the number of 25 m and 50 m pool lengths from a swum distance and time.\n\nUse when: You swam (or plan to swim) a given distance in a given time and need the pace per 100 m or 100 yd, e.g. to set interval targets.\nDo not use when: The distance is in yards (convert first: 1 yd = 0.9144 m) or you need running/cycling pace (use running-pace or pace-converter).\nFormula: pace_100m = time_seconds × 100 / distance_m; pace_100yd = pace_100m × 0.9144; speed_m_per_s = distance_m / time_seconds; speed_kmh = speed_m_per_s × 3.6\nDocs: https://tttkmbb.com/fitness/swim-pace.md","parameters":[{"name":"distance_m","in":"query","required":true,"description":"Distance swum in metres. Unit: m.","schema":{"description":"Distance swum in metres. Unit: m.","type":"number","maximum":100000,"exclusiveMinimum":0,"examples":[1500],"x-unit":"m"},"example":1500},{"name":"time","in":"query","required":true,"description":"Elapsed time as h:mm:ss, mm:ss (30:00) or plain minutes.","schema":{"description":"Elapsed time as h:mm:ss, mm:ss (30:00) or plain minutes.","type":"string","examples":["30:00"]},"example":"30:00"}],"x-calculator-id":"swim-pace","x-outputs":["pace_per_100m [min:sec/100 m]","pace_per_100yd [min:sec/100 yd]","pace_seconds_per_100m [s/100 m]","speed_m_per_s [m/s]","speed_kmh [km/h]","lengths_25m_pool [lengths]","lengths_50m_pool [lengths]"],"x-example":{"inputs":{"distance_m":1500,"time":"30:00"},"expected":{"pace_per_100m":"2:00","pace_per_100yd":"1:50","pace_seconds_per_100m":120,"speed_m_per_s":0.833,"speed_kmh":3,"lengths_25m_pool":60}},"responses":{"200":{"description":"Result with values pace_per_100m, pace_per_100yd, pace_seconds_per_100m, speed_m_per_s, speed_kmh, lengths_25m_pool, lengths_50m_pool","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/pace-converter":{"get":{"operationId":"convert_running_pace","tags":["fitness"],"summary":"Pace Converter","description":"Converts a running pace or speed given in any one of min/km, min/mile, km/h or mph into all four units, plus seconds per km/mile and metres per second.\n\nUse when: You need to translate a treadmill speed into a pace, a min/mile pace into min/km, or any other pace/speed unit conversion.\nDo not use when: You have a distance and time rather than a pace (use running-pace) or a swim time (use swim-pace).\nFormula: pace_s_per_km = 3600 / speed_kmh; pace_s_per_mile = pace_s_per_km × 1.609344; speed_mph = speed_kmh / 1.609344; speed_m_per_s = speed_kmh / 3.6 (1 mile = 1609.344 m)\nDocs: https://tttkmbb.com/fitness/pace-converter.md","parameters":[{"name":"pace_min_per_km","in":"query","required":false,"description":"Pace as mm:ss per kilometre (e.g. 5:00) or decimal minutes (5.5). Give exactly one of the four inputs; if several are given, this one takes precedence.","schema":{"description":"Pace as mm:ss per kilometre (e.g. 5:00) or decimal minutes (5.5). Give exactly one of the four inputs; if several are given, this one takes precedence.","type":"string","examples":["5:00"]},"example":"5:00"},{"name":"pace_min_per_mile","in":"query","required":false,"description":"Pace as mm:ss per mile (e.g. 8:03) or decimal minutes.","schema":{"description":"Pace as mm:ss per mile (e.g. 8:03) or decimal minutes.","type":"string","examples":["8:03"]},"example":"8:03"},{"name":"speed_kmh","in":"query","required":false,"description":"Speed in kilometres per hour (e.g. treadmill display). Unit: km/h.","schema":{"description":"Speed in kilometres per hour (e.g. treadmill display). Unit: km/h.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[12],"x-unit":"km/h"},"example":12},{"name":"speed_mph","in":"query","required":false,"description":"Speed in miles per hour. Unit: mph.","schema":{"description":"Speed in miles per hour. Unit: mph.","type":"number","maximum":60,"exclusiveMinimum":0,"examples":[7.46],"x-unit":"mph"},"example":7.46}],"x-calculator-id":"pace-converter","x-outputs":["pace_min_per_km [min:sec/km]","pace_min_per_mile [min:sec/mi]","speed_kmh [km/h]","speed_mph [mph]","pace_seconds_per_km [s/km]","pace_seconds_per_mile [s/mi]","speed_m_per_s [m/s]","source_input"],"x-example":{"inputs":{"pace_min_per_km":"5:00"},"expected":{"pace_min_per_mile":"8:03","speed_kmh":12,"speed_mph":7.46,"pace_seconds_per_km":300,"pace_seconds_per_mile":482.8,"speed_m_per_s":3.333,"source_input":"pace_min_per_km"}},"responses":{"200":{"description":"Result with values pace_min_per_km, pace_min_per_mile, speed_kmh, speed_mph, pace_seconds_per_km, pace_seconds_per_mile, speed_m_per_s, source_input","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/percentage":{"get":{"operationId":"calculate_percentage","tags":["math"],"summary":"Percentage Calculator","description":"Solves the three basic percentage questions (a percentage of a number, what percentage one number is of another, and the whole behind a known part and percentage). Always returns the part, the whole and the percent.\n\nUse when: You need a percentage of a value, the percentage one value represents of another, or the base value that a part and its percentage imply.\nDo not use when: You need the percentage change between two values (use percentage-change), a price after a percentage discount (use discount) or a tax amount (use sales-tax).\nFormula: percent_of: result = x / 100 × y. is_what_percent: result = x / y × 100. percent_of_what: result = x / (y / 100). In every mode part = percent × whole / 100.\nDocs: https://tttkmbb.com/math/percentage.md","parameters":[{"name":"mode","in":"query","required":false,"description":"Which percentage question to solve; x and y take the meaning shown in the label of the chosen mode. One of: percent_of, is_what_percent, percent_of_what.","schema":{"description":"Which percentage question to solve; x and y take the meaning shown in the label of the chosen mode.","type":"string","enum":["percent_of","is_what_percent","percent_of_what"],"default":"percent_of","examples":["percent_of"]},"example":"percent_of"},{"name":"x","in":"query","required":true,"description":"First number: the percent (percent_of) or the part (is_what_percent, percent_of_what). Percents are plain numbers, 15 means 15%.","schema":{"description":"First number: the percent (percent_of) or the part (is_what_percent, percent_of_what). Percents are plain numbers, 15 means 15%.","type":"number","examples":[15]},"example":15},{"name":"y","in":"query","required":true,"description":"Second number: the whole (percent_of, is_what_percent) or the percent (percent_of_what).","schema":{"description":"Second number: the whole (percent_of, is_what_percent) or the percent (percent_of_what).","type":"number","examples":[240]},"example":240}],"x-calculator-id":"percentage","x-outputs":["result","sentence","part","whole","percent [%]"],"x-example":{"inputs":{"mode":"percent_of","x":15,"y":240},"expected":{"result":36,"part":36,"whole":240,"percent":15,"sentence":"15% of 240 is 36."}},"responses":{"200":{"description":"Result with values result, sentence, part, whole, percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/percentage-change":{"get":{"operationId":"calculate_percentage_change","tags":["math"],"summary":"Percentage Change Calculator","description":"Computes the relative change from an old value to a new value as a percentage, the signed absolute change, the new/old ratio and the symmetric percent difference.\n\nUse when: You have a starting and an ending value and need the percentage increase or decrease, or a symmetric percent difference between two comparable values.\nDo not use when: You need a percentage of a number (use percentage), an annualised growth rate over several years (use cagr) or an investment return (use roi).\nFormula: change_percent = (new_value − old_value) / |old_value| × 100; percent_difference = |new_value − old_value| / ((|new_value| + |old_value|) / 2) × 100\nDocs: https://tttkmbb.com/math/percentage-change.md","parameters":[{"name":"old_value","in":"query","required":true,"description":"Starting (reference) value. Must not be 0.","schema":{"description":"Starting (reference) value. Must not be 0.","type":"number","examples":[50]},"example":50},{"name":"new_value","in":"query","required":true,"description":"Ending value.","schema":{"description":"Ending value.","type":"number","examples":[65]},"example":65}],"x-calculator-id":"percentage-change","x-outputs":["change_percent [%]","absolute_change","direction","ratio","percent_difference [%]"],"x-example":{"inputs":{"old_value":50,"new_value":65},"expected":{"change_percent":30,"absolute_change":15,"direction":"increase","ratio":1.3,"percent_difference":26.09}},"responses":{"200":{"description":"Result with values change_percent, absolute_change, direction, ratio, percent_difference","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/quadratic-equation":{"get":{"operationId":"solve_quadratic_equation","tags":["math"],"summary":"Quadratic Equation Solver","description":"Solves ax² + bx + c = 0 with the quadratic formula, reporting the discriminant, both roots (real, or complex conjugates written as strings), the vertex of the parabola and the sum and product of the roots.\n\nUse when: You need the solutions of a second-degree polynomial equation, or the vertex and discriminant of a parabola y = ax² + bx + c.\nDo not use when: The coefficient a is 0 (the equation is linear: x = −c / b), or you need roots of x^n = c for other powers (use nth-root).\nFormula: Δ = b² − 4ac; x = (−b ± √Δ) / (2a); for Δ < 0: x = −b/(2a) ± i·√(−Δ)/(2|a|); vertex = (−b/(2a), c − b²/(4a))\nDocs: https://tttkmbb.com/math/quadratic-equation.md","parameters":[{"name":"a","in":"query","required":true,"description":"Coefficient of x². Must not be 0.","schema":{"description":"Coefficient of x². Must not be 0.","type":"number","examples":[1]},"example":1},{"name":"b","in":"query","required":true,"description":"Coefficient of x.","schema":{"description":"Coefficient of x.","type":"number","examples":[-5]},"example":-5},{"name":"c","in":"query","required":true,"description":"Constant term.","schema":{"description":"Constant term.","type":"number","examples":[6]},"example":6}],"x-calculator-id":"quadratic-equation","x-outputs":["discriminant","nature","root1","root2","roots","vertex_x","vertex_y","sum_of_roots","product_of_roots"],"x-example":{"inputs":{"a":1,"b":-5,"c":6},"expected":{"discriminant":1,"nature":"Two distinct real roots","root1":3,"root2":2,"roots":"3, 2","vertex_x":2.5,"vertex_y":-0.25,"sum_of_roots":5,"product_of_roots":6}},"responses":{"200":{"description":"Result with values discriminant, nature, root1, root2, roots, vertex_x, vertex_y, sum_of_roots, product_of_roots","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/gcd-lcm":{"get":{"operationId":"calculate_gcd_lcm","tags":["math"],"summary":"GCD and LCM Calculator","description":"Computes the greatest common divisor (highest common factor) and least common multiple of two or more integers with the Euclidean algorithm.\n\nUse when: You need the GCD/HCF or LCM of a list of integers, e.g. to reduce fractions, find a common denominator or check whether numbers are coprime.\nDo not use when: You need the prime factors themselves (use prime-factorization) or want to reduce a single fraction (use fraction-simplifier).\nFormula: gcd(a, b) by the Euclidean algorithm (gcd(a, b) = gcd(b, a mod b)); lcm(a, b) = |a × b| / gcd(a, b); both are folded over the list: gcd(a, b, c) = gcd(gcd(a, b), c)\nDocs: https://tttkmbb.com/math/gcd-lcm.md","parameters":[{"name":"numbers","in":"query","required":true,"description":"Two or more integers, comma-separated (e.g. 12, 18, 24). Negative values are treated by their absolute value.","schema":{"description":"Two or more integers, comma-separated (e.g. 12, 18, 24). Negative values are treated by their absolute value. Comma-separated list in query strings.","type":"string","minItems":2,"examples":[[12,18]]},"example":"12,18"}],"x-calculator-id":"gcd-lcm","x-outputs":["gcd","lcm","coprime"],"x-example":{"inputs":{"numbers":[12,18]},"expected":{"gcd":6,"lcm":36,"coprime":false}},"responses":{"200":{"description":"Result with values gcd, lcm, coprime","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/prime-factorization":{"get":{"operationId":"calculate_prime_factorization","tags":["math"],"summary":"Prime Factorization Calculator","description":"Decomposes an integer into its prime factors by trial division, tests primality, and derives the number and sum of its divisors from the exponents.\n\nUse when: You need the prime factors of an integer up to 10^12, want to know whether it is prime, or need its divisor count.\nDo not use when: You need the GCD or LCM of several numbers (use gcd-lcm) or factorials and binomial coefficients (use factorial, combinations-permutations).\nFormula: n = p₁^k₁ × p₂^k₂ × … (trial division by 2, then odd numbers up to √n); τ(n) = Π (kᵢ + 1); σ(n) = Π (pᵢ^(kᵢ+1) − 1) / (pᵢ − 1)\nDocs: https://tttkmbb.com/math/prime-factorization.md","parameters":[{"name":"n","in":"query","required":true,"description":"Integer to factor, from 2 to 1,000,000,000,000.","schema":{"description":"Integer to factor, from 2 to 1,000,000,000,000.","type":"integer","minimum":2,"maximum":1000000000000,"examples":[360]},"example":360}],"x-calculator-id":"prime-factorization","x-outputs":["is_prime","factors","factorization","distinct_primes","divisor_count","sum_of_divisors"],"x-example":{"inputs":{"n":360},"expected":{"is_prime":false,"factors":[2,2,2,3,3,5],"factorization":"2^3 × 3^2 × 5","distinct_primes":[2,3,5],"divisor_count":24,"sum_of_divisors":1170}},"responses":{"200":{"description":"Result with values is_prime, factors, factorization, distinct_primes, divisor_count, sum_of_divisors","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/factorial":{"get":{"operationId":"calculate_factorial","tags":["math"],"summary":"Factorial Calculator","description":"Computes n! = 1 × 2 × … × n for integers from 0 to 170, together with the number of decimal digits, the number of trailing zeros and a scientific-notation form.\n\nUse when: You need the factorial of an integer, e.g. for counting arrangements or as a building block of permutations and combinations.\nDo not use when: n exceeds 170 (the result overflows double precision; use Stirling's approximation or log-gamma) or you need C(n, k) / P(n, k) directly (use combinations-permutations).\nFormula: n! = n × (n − 1) × … × 2 × 1, with 0! = 1; digits = ⌊Σ log10(i)⌋ + 1; trailing_zeros = Σ ⌊n / 5^k⌋\nDocs: https://tttkmbb.com/math/factorial.md","parameters":[{"name":"n","in":"query","required":true,"description":"Non-negative integer up to 170.","schema":{"description":"Non-negative integer up to 170.","type":"integer","minimum":0,"maximum":170,"examples":[5]},"example":5}],"x-calculator-id":"factorial","x-outputs":["factorial","digits","trailing_zeros","scientific_notation"],"x-example":{"inputs":{"n":5},"expected":{"factorial":120,"digits":3,"trailing_zeros":1,"scientific_notation":"1.2 × 10^2"}},"responses":{"200":{"description":"Result with values factorial, digits, trailing_zeros, scientific_notation","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/combinations-permutations":{"get":{"operationId":"calculate_combinations_permutations","tags":["math"],"summary":"Combinations and Permutations Calculator","description":"Counts the ways to choose k items from n: combinations C(n, k) when order does not matter and permutations P(n, k) when it does, with or without repetition.\n\nUse when: You need nCr (binomial coefficient), nPr, or the number of multisets or sequences of length k drawn from n items.\nDo not use when: You need the probability of a specific outcome (use probability-of-events or binomial-distribution) or a plain factorial (use factorial).\nFormula: Without repetition: C(n,k) = n! / (k! (n−k)!), P(n,k) = n! / (n−k)!. With repetition: C = (n+k−1)! / (k! (n−1)!), P = n^k\nDocs: https://tttkmbb.com/math/combinations-permutations.md","parameters":[{"name":"n","in":"query","required":true,"description":"Size of the set.","schema":{"description":"Size of the set.","type":"integer","minimum":0,"maximum":100000,"examples":[10]},"example":10},{"name":"k","in":"query","required":true,"description":"Number of items selected or arranged.","schema":{"description":"Number of items selected or arranged.","type":"integer","minimum":0,"maximum":1000,"examples":[3]},"example":3},{"name":"with_repetition","in":"query","required":false,"description":"true when an item may be chosen more than once (multisets / sequences with replacement).","schema":{"description":"true when an item may be chosen more than once (multisets / sequences with replacement).","type":"boolean","default":false,"examples":[false]},"example":false}],"x-calculator-id":"combinations-permutations","x-outputs":["combinations","permutations","expression"],"x-example":{"inputs":{"n":10,"k":3,"with_repetition":false},"expected":{"combinations":120,"permutations":720,"expression":"C(10,3) = 120; P(10,3) = 720"}},"responses":{"200":{"description":"Result with values combinations, permutations, expression","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/exponent":{"get":{"operationId":"calculate_exponent","tags":["math"],"summary":"Exponent Calculator","description":"Raises a base to any real exponent (base^exponent), including negative and fractional exponents, and reports the reciprocal and a scientific-notation form.\n\nUse when: You need a power such as 2^10, 1.05^30 or 8^(1/3), or a quick check of how large a power gets.\nDo not use when: You need the exponent that produces a given result (use logarithm) or the n-th root with sign handling for negatives (use nth-root).\nFormula: result = base^exponent; for a fractional exponent p/q: base^(p/q) = (base^(1/q))^p; base^(−n) = 1 / base^n\nDocs: https://tttkmbb.com/math/exponent.md","parameters":[{"name":"base","in":"query","required":true,"description":"The number being multiplied by itself.","schema":{"description":"The number being multiplied by itself.","type":"number","minimum":-1000000000,"maximum":1000000000,"examples":[2]},"example":2},{"name":"exponent","in":"query","required":true,"description":"The power; may be negative or fractional. A negative base requires an integer exponent.","schema":{"description":"The power; may be negative or fractional. A negative base requires an integer exponent.","type":"number","minimum":-1000,"maximum":1000,"examples":[10]},"example":10}],"x-calculator-id":"exponent","x-outputs":["result","scientific_notation","reciprocal","expression"],"x-example":{"inputs":{"base":2,"exponent":10},"expected":{"result":1024,"scientific_notation":"1.024 × 10^3","reciprocal":0.0009765625,"expression":"2^10 = 1024"}},"responses":{"200":{"description":"Result with values result, scientific_notation, reciprocal, expression","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/nth-root":{"get":{"operationId":"calculate_nth_root","tags":["math"],"summary":"Nth Root Calculator","description":"Computes the principal n-th root of a number (value^(1/n)), returning the real negative root for odd n and the second, negative root for even n.\n\nUse when: You need √x, ∛x or any integer-degree root, including odd roots of negative numbers.\nDo not use when: You need a fractional power such as x^(2/3) (use exponent) or the solutions of a quadratic (use quadratic-equation).\nFormula: root = |value|^(1/n) × sign(value); for even n and value > 0 the roots are ±root\nDocs: https://tttkmbb.com/math/nth-root.md","parameters":[{"name":"value","in":"query","required":true,"description":"The number under the root sign. Negative values are allowed only for odd n.","schema":{"description":"The number under the root sign. Negative values are allowed only for odd n.","type":"number","minimum":-1e+300,"maximum":1e+300,"examples":[16]},"example":16},{"name":"n","in":"query","required":true,"description":"2 for square root, 3 for cube root, etc.","schema":{"description":"2 for square root, 3 for cube root, etc.","type":"integer","minimum":1,"maximum":1000,"examples":[4]},"example":4}],"x-calculator-id":"nth-root","x-outputs":["root","negative_root","verification","expression"],"x-example":{"inputs":{"value":16,"n":4},"expected":{"root":2,"negative_root":-2,"verification":16,"expression":"16^(1/4) = 2"}},"responses":{"200":{"description":"Result with values root, negative_root, verification, expression","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/logarithm":{"get":{"operationId":"calculate_logarithm","tags":["math"],"summary":"Logarithm Calculator","description":"Computes the logarithm of a positive number to any base using the change-of-base formula, and always reports the natural, common (base 10) and binary (base 2) logarithms.\n\nUse when: You need log_b(x) for an arbitrary base, or ln, log10 and log2 of a number at once.\nDo not use when: You need to raise a base to a power (use exponent) or a root (use nth-root); for pH-style −log10 of a concentration use ph.\nFormula: log_b(x) = ln(x) / ln(b) (change of base); ln = log_e, log10 = log_10, log2 = log_2\nDocs: https://tttkmbb.com/math/logarithm.md","parameters":[{"name":"value","in":"query","required":true,"description":"Positive number whose logarithm is taken.","schema":{"description":"Positive number whose logarithm is taken.","type":"number","exclusiveMinimum":0,"examples":[1000]},"example":1000},{"name":"base","in":"query","required":false,"description":"Logarithm base; positive and not 1. Use 2.718281828459045 for the natural logarithm, or read the ln output.","schema":{"description":"Logarithm base; positive and not 1. Use 2.718281828459045 for the natural logarithm, or read the ln output.","type":"number","exclusiveMinimum":0,"default":10,"examples":[10]},"example":10}],"x-calculator-id":"logarithm","x-outputs":["log","ln","log10","log2","expression"],"x-example":{"inputs":{"value":1000,"base":10},"expected":{"log":3,"ln":6.907755,"log10":3,"log2":9.965784,"expression":"log_10(1000) = 3"}},"responses":{"200":{"description":"Result with values log, ln, log10, log2, expression","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/fraction-simplifier":{"get":{"operationId":"calculate_simplified_fraction","tags":["math"],"summary":"Fraction Simplifier","description":"Reduces a fraction to lowest terms by dividing by the GCD and converts it to a mixed number, a decimal and a percentage.\n\nUse when: You have a numerator and denominator and want the reduced fraction, its mixed-number form, decimal value or percent.\nDo not use when: You need to add or multiply fractions (reduce each result with this tool afterwards) or to simplify a ratio of non-integers (use ratio).\nFormula: simplified = (numerator / g) / (denominator / g) with g = gcd(|numerator|, |denominator|); decimal = numerator / denominator; percent = decimal × 100\nDocs: https://tttkmbb.com/math/fraction-simplifier.md","parameters":[{"name":"numerator","in":"query","required":true,"description":"Top number of the fraction (may be negative).","schema":{"description":"Top number of the fraction (may be negative).","type":"integer","minimum":-1000000000000000,"maximum":1000000000000000,"examples":[6]},"example":6},{"name":"denominator","in":"query","required":true,"description":"Bottom number of the fraction; must not be 0.","schema":{"description":"Bottom number of the fraction; must not be 0.","type":"integer","minimum":-1000000000000000,"maximum":1000000000000000,"examples":[8]},"example":8}],"x-calculator-id":"fraction-simplifier","x-outputs":["simplified","simplified_numerator","simplified_denominator","mixed_number","decimal","percent [%]","gcd"],"x-example":{"inputs":{"numerator":6,"denominator":8},"expected":{"simplified":"3/4","simplified_numerator":3,"simplified_denominator":4,"mixed_number":"3/4","decimal":0.75,"percent":75,"gcd":2}},"responses":{"200":{"description":"Result with values simplified, simplified_numerator, simplified_denominator, mixed_number, decimal, percent, gcd","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/ratio":{"get":{"operationId":"calculate_ratio","tags":["math"],"summary":"Ratio Calculator","description":"Simplifies a ratio a:b to lowest terms (decimals are scaled to integers first), expresses it as a decimal, as n:1 and as percentage shares, and optionally scales it to a new value of a.\n\nUse when: You need to reduce a ratio, compare two quantities, or find the matching second value when the first is scaled (e.g. mixing or recipe ratios).\nDo not use when: You are solving a/b = c/x with three known values (use proportion) or reducing a fraction with sign handling (use fraction-simplifier).\nFormula: simplified = (A / g):(B / g) with A, B = a, b scaled to integers and g = gcd(A, B); decimal = a / b; new_b = new_a × b / a\nDocs: https://tttkmbb.com/math/ratio.md","parameters":[{"name":"a","in":"query","required":true,"description":"First term of the ratio a:b. Decimals are allowed (rounded to 6 decimal places before simplifying).","schema":{"description":"First term of the ratio a:b. Decimals are allowed (rounded to 6 decimal places before simplifying).","type":"number","minimum":0.000001,"maximum":1000000000,"examples":[6]},"example":6},{"name":"b","in":"query","required":true,"description":"Second term of the ratio a:b.","schema":{"description":"Second term of the ratio a:b.","type":"number","minimum":0.000001,"maximum":1000000000,"examples":[4]},"example":4},{"name":"new_a","in":"query","required":false,"description":"Optional new first quantity; returns the second quantity that keeps the same ratio.","schema":{"description":"Optional new first quantity; returns the second quantity that keeps the same ratio.","type":"number","exclusiveMinimum":0,"examples":[9]},"example":9}],"x-calculator-id":"ratio","x-outputs":["simplified","decimal","ratio_to_one","one_to_ratio","share_a_percent [%]","share_b_percent [%]","new_b"],"x-example":{"inputs":{"a":6,"b":4,"new_a":9},"expected":{"simplified":"3:2","decimal":1.5,"ratio_to_one":"1.5:1","one_to_ratio":"1:0.666667","share_a_percent":60,"share_b_percent":40,"new_b":6}},"responses":{"200":{"description":"Result with values simplified, decimal, ratio_to_one, one_to_ratio, share_a_percent, share_b_percent, new_b","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/proportion":{"get":{"operationId":"solve_proportion","tags":["math"],"summary":"Proportion Calculator","description":"Solves the proportion a / b = c / x for the unknown fourth term by cross-multiplication (x = b × c / a) and reports the common scale factor.\n\nUse when: Three terms of a proportion are known and you need the fourth, e.g. converting a recipe, map scale or unit rate.\nDo not use when: You only want to simplify a ratio (use ratio) or the unknown is a percentage (use percentage).\nFormula: a / b = c / x  ⇒  a × x = b × c  ⇒  x = b × c / a; scale_factor = c / a\nDocs: https://tttkmbb.com/math/proportion.md","parameters":[{"name":"a","in":"query","required":true,"description":"First term (numerator of the known ratio). Must not be 0.","schema":{"description":"First term (numerator of the known ratio). Must not be 0.","type":"number","examples":[2]},"example":2},{"name":"b","in":"query","required":true,"description":"Second term (denominator of the known ratio). Must not be 0.","schema":{"description":"Second term (denominator of the known ratio). Must not be 0.","type":"number","examples":[3]},"example":3},{"name":"c","in":"query","required":true,"description":"Third term: the numerator paired with the unknown x. Must not be 0.","schema":{"description":"Third term: the numerator paired with the unknown x. Must not be 0.","type":"number","examples":[4]},"example":4}],"x-calculator-id":"proportion","x-outputs":["x","scale_factor","ratio","equation"],"x-example":{"inputs":{"a":2,"b":3,"c":4},"expected":{"x":6,"scale_factor":2,"ratio":0.666667,"equation":"2/3 = 4/6"}},"responses":{"200":{"description":"Result with values x, scale_factor, ratio, equation","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/slope":{"get":{"operationId":"calculate_slope","tags":["math"],"summary":"Slope Calculator","description":"Computes the slope of the line through two points (rise over run), its y- and x-intercepts, the slope-intercept equation y = mx + b, the angle of inclination and the distance between the points.\n\nUse when: You have two points and need the gradient or the equation of the line through them.\nDo not use when: You need a best-fit line through many points (use linear-regression) or only the distance between two points (use distance-2d).\nFormula: m = (y₂ − y₁) / (x₂ − x₁); b = y₁ − m·x₁; x_intercept = −b / m; angle = atan(m) × 180/π; distance = √(Δx² + Δy²)\nDocs: https://tttkmbb.com/math/slope.md","parameters":[{"name":"x1","in":"query","required":true,"description":"x-coordinate of the first point.","schema":{"description":"x-coordinate of the first point.","type":"number","examples":[1]},"example":1},{"name":"y1","in":"query","required":true,"description":"y-coordinate of the first point.","schema":{"description":"y-coordinate of the first point.","type":"number","examples":[2]},"example":2},{"name":"x2","in":"query","required":true,"description":"x-coordinate of the second point.","schema":{"description":"x-coordinate of the second point.","type":"number","examples":[3]},"example":3},{"name":"y2","in":"query","required":true,"description":"y-coordinate of the second point.","schema":{"description":"y-coordinate of the second point.","type":"number","examples":[6]},"example":6}],"x-calculator-id":"slope","x-outputs":["slope","slope_type","y_intercept","x_intercept","equation","angle_degrees [°]","delta_x","delta_y","distance"],"x-example":{"inputs":{"x1":1,"y1":2,"x2":3,"y2":6},"expected":{"slope":2,"slope_type":"positive (rising)","y_intercept":0,"x_intercept":0,"equation":"y = 2x","angle_degrees":63.4349,"delta_x":2,"delta_y":4,"distance":4.472136}},"responses":{"200":{"description":"Result with values slope, slope_type, y_intercept, x_intercept, equation, angle_degrees, delta_x, delta_y, distance","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/distance-2d":{"get":{"operationId":"calculate_distance_2d","tags":["math"],"summary":"Distance Between Two Points Calculator","description":"Computes the straight-line (Euclidean) distance between two points in the plane, their midpoint, the coordinate differences and the Manhattan distance.\n\nUse when: You have two (x, y) coordinates and need the distance between them or the point halfway between them.\nDo not use when: You need the slope or equation of the line through the points (use slope) or the third side of a right triangle from two sides (use pythagorean).\nFormula: distance = √((x₂ − x₁)² + (y₂ − y₁)²); midpoint = ((x₁ + x₂)/2, (y₁ + y₂)/2); manhattan = |x₂ − x₁| + |y₂ − y₁|\nDocs: https://tttkmbb.com/math/distance-2d.md","parameters":[{"name":"x1","in":"query","required":true,"description":"x-coordinate of the first point.","schema":{"description":"x-coordinate of the first point.","type":"number","examples":[1]},"example":1},{"name":"y1","in":"query","required":true,"description":"y-coordinate of the first point.","schema":{"description":"y-coordinate of the first point.","type":"number","examples":[2]},"example":2},{"name":"x2","in":"query","required":true,"description":"x-coordinate of the second point.","schema":{"description":"x-coordinate of the second point.","type":"number","examples":[3]},"example":3},{"name":"y2","in":"query","required":true,"description":"y-coordinate of the second point.","schema":{"description":"y-coordinate of the second point.","type":"number","examples":[6]},"example":6}],"x-calculator-id":"distance-2d","x-outputs":["distance","midpoint_x","midpoint_y","midpoint","delta_x","delta_y","manhattan_distance"],"x-example":{"inputs":{"x1":0,"y1":0,"x2":3,"y2":4},"expected":{"distance":5,"midpoint_x":1.5,"midpoint_y":2,"midpoint":"(1.5, 2)","delta_x":3,"delta_y":4,"manhattan_distance":7}},"responses":{"200":{"description":"Result with values distance, midpoint_x, midpoint_y, midpoint, delta_x, delta_y, manhattan_distance","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/pythagorean":{"get":{"operationId":"solve_pythagorean_theorem","tags":["math"],"summary":"Pythagorean Theorem Calculator","description":"Finds the missing side of a right triangle from any two of the legs a, b and hypotenuse c using a² + b² = c², and reports the area, perimeter and acute angles.\n\nUse when: You know two sides of a right triangle and need the third, or want to check whether three lengths form a right triangle.\nDo not use when: The triangle is not right-angled (use triangle-solver) or you need the distance between coordinates (use distance-2d).\nFormula: c = √(a² + b²); a = √(c² − b²); b = √(c² − a²); area = a·b/2; angle_a = atan(a/b), angle_b = atan(b/a)\nDocs: https://tttkmbb.com/math/pythagorean.md","parameters":[{"name":"a","in":"query","required":false,"description":"First leg (a side adjacent to the right angle). Give any two of a, b, c.","schema":{"description":"First leg (a side adjacent to the right angle). Give any two of a, b, c.","type":"number","exclusiveMinimum":0,"examples":[3]},"example":3},{"name":"b","in":"query","required":false,"description":"Second leg.","schema":{"description":"Second leg.","type":"number","exclusiveMinimum":0,"examples":[4]},"example":4},{"name":"c","in":"query","required":false,"description":"Hypotenuse (the longest side, opposite the right angle).","schema":{"description":"Hypotenuse (the longest side, opposite the right angle).","type":"number","exclusiveMinimum":0,"examples":[5]},"example":5}],"x-calculator-id":"pythagorean","x-outputs":["side_a","side_b","hypotenuse_c","solved_for","area","perimeter","angle_a_degrees [°]","angle_b_degrees [°]"],"x-example":{"inputs":{"a":3,"b":4},"expected":{"side_a":3,"side_b":4,"hypotenuse_c":5,"solved_for":"c","area":6,"perimeter":12,"angle_a_degrees":36.8699,"angle_b_degrees":53.1301}},"responses":{"200":{"description":"Result with values side_a, side_b, hypotenuse_c, solved_for, area, perimeter, angle_a_degrees, angle_b_degrees","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/rounding":{"get":{"operationId":"calculate_rounded_value","tags":["math"],"summary":"Rounding Calculator","description":"Rounds a number to a given number of decimal places (negative for tens, hundreds, …) or significant figures using round-half-away-from-zero, and also reports the ceiling, floor and truncated values at the same precision.\n\nUse when: You need a number rounded to a fixed number of decimals or significant figures, or its ceiling/floor at that precision, with the exact decimal behaviour (2.675 → 2.68).\nDo not use when: You want a number written in scientific or engineering notation (use scientific-notation).\nFormula: rounded = round_half_away(value × 10^p) / 10^p, where p = precision (decimals) or p = precision − 1 − ⌊log10|value|⌋ (significant figures); ceiling, floor and truncated use ⌈·⌉, ⌊·⌋ and trunc(·) instead\nDocs: https://tttkmbb.com/math/rounding.md","parameters":[{"name":"value","in":"query","required":true,"description":"The number to round.","schema":{"description":"The number to round.","type":"number","minimum":-1000000000000,"maximum":1000000000000,"examples":[2.675]},"example":2.675},{"name":"precision","in":"query","required":false,"description":"Decimal places when mode is decimals (negative rounds to tens, hundreds, …), or the number of significant figures (1–12) when mode is significant_figures.","schema":{"description":"Decimal places when mode is decimals (negative rounds to tens, hundreds, …), or the number of significant figures (1–12) when mode is significant_figures.","type":"integer","minimum":-9,"maximum":12,"default":2,"examples":[2]},"example":2},{"name":"mode","in":"query","required":false,"description":"Whether precision counts decimal places or significant figures. One of: decimals, significant_figures.","schema":{"description":"Whether precision counts decimal places or significant figures.","type":"string","enum":["decimals","significant_figures"],"default":"decimals","examples":["decimals"]},"example":"decimals"}],"x-calculator-id":"rounding","x-outputs":["rounded","rounded_text","ceiling","floor","truncated","decimal_places_used"],"x-example":{"inputs":{"value":2.675,"precision":2,"mode":"decimals"},"expected":{"rounded":2.68,"rounded_text":"2.68","ceiling":2.68,"floor":2.67,"truncated":2.67,"decimal_places_used":2}},"responses":{"200":{"description":"Result with values rounded, rounded_text, ceiling, floor, truncated, decimal_places_used","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/arithmetic-sequence":{"get":{"operationId":"calculate_arithmetic_sequence","tags":["math"],"summary":"Arithmetic Sequence Calculator","description":"Computes the n-th term and the sum of the first n terms of an arithmetic progression from the first term and the common difference, and lists the first terms.\n\nUse when: Terms increase or decrease by a constant amount (e.g. 2, 5, 8, …) and you need a specific term or the total of the first n terms.\nDo not use when: Terms are multiplied by a constant ratio (use geometric-sequence) or you need interest that compounds (use compound-interest).\nFormula: aₙ = a₁ + (n − 1)·d; Sₙ = n·(a₁ + aₙ)/2 = n·(2a₁ + (n − 1)·d)/2\nDocs: https://tttkmbb.com/math/arithmetic-sequence.md","parameters":[{"name":"first_term","in":"query","required":true,"description":"The first term of the sequence.","schema":{"description":"The first term of the sequence.","type":"number","examples":[2]},"example":2},{"name":"common_difference","in":"query","required":true,"description":"Amount added to each term to get the next (negative for a decreasing sequence).","schema":{"description":"Amount added to each term to get the next (negative for a decreasing sequence).","type":"number","examples":[3]},"example":3},{"name":"n","in":"query","required":true,"description":"Index of the term to compute and the number of terms to sum.","schema":{"description":"Index of the term to compute and the number of terms to sum.","type":"integer","minimum":1,"maximum":1000000000,"examples":[10]},"example":10}],"x-calculator-id":"arithmetic-sequence","x-outputs":["nth_term","sum","first_terms","explicit_formula"],"x-example":{"inputs":{"first_term":2,"common_difference":3,"n":10},"expected":{"nth_term":29,"sum":155,"first_terms":[2,5,8,11,14,17,20,23,26,29],"explicit_formula":"a_n = 2 + (n − 1) × 3"}},"responses":{"200":{"description":"Result with values nth_term, sum, first_terms, explicit_formula","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/geometric-sequence":{"get":{"operationId":"calculate_geometric_sequence","tags":["math"],"summary":"Geometric Sequence Calculator","description":"Computes the n-th term and the sum of the first n terms of a geometric progression from the first term and common ratio, plus the sum to infinity when |r| < 1.\n\nUse when: Each term is the previous one multiplied by a constant ratio (e.g. 3, 6, 12, …) and you need a term, a partial sum or the limit of the series.\nDo not use when: Terms change by a constant difference (use arithmetic-sequence) or you need a money value with periodic deposits (use future-value / compound-interest).\nFormula: aₙ = a₁·r^(n−1); Sₙ = a₁·(1 − rⁿ)/(1 − r) for r ≠ 1 (Sₙ = n·a₁ for r = 1); S∞ = a₁/(1 − r) for |r| < 1\nDocs: https://tttkmbb.com/math/geometric-sequence.md","parameters":[{"name":"first_term","in":"query","required":true,"description":"The first term of the sequence.","schema":{"description":"The first term of the sequence.","type":"number","examples":[3]},"example":3},{"name":"common_ratio","in":"query","required":true,"description":"Factor between consecutive terms (may be negative or fractional).","schema":{"description":"Factor between consecutive terms (may be negative or fractional).","type":"number","examples":[2]},"example":2},{"name":"n","in":"query","required":true,"description":"Index of the term to compute and the number of terms to sum.","schema":{"description":"Index of the term to compute and the number of terms to sum.","type":"integer","minimum":1,"maximum":100000,"examples":[5]},"example":5}],"x-calculator-id":"geometric-sequence","x-outputs":["nth_term","sum","infinite_sum","converges","first_terms","explicit_formula"],"x-example":{"inputs":{"first_term":3,"common_ratio":2,"n":5},"expected":{"nth_term":48,"sum":93,"converges":false,"first_terms":[3,6,12,24,48],"explicit_formula":"a_n = 3 × 2^(n − 1)"}},"responses":{"200":{"description":"Result with values nth_term, sum, infinite_sum, converges, first_terms, explicit_formula","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/modulo":{"get":{"operationId":"calculate_modulo","tags":["math"],"summary":"Modulo Calculator","description":"Divides one number by another and reports the remainder under the three common sign conventions (truncated as in C/JavaScript, floored as in Python, and the non-negative Euclidean modulo) together with the integer quotient.\n\nUse when: You need a mod b, the remainder of a division, or want to know how different programming languages treat negative operands.\nDo not use when: You need the prime factors or divisors of a number (use prime-factorization) or a change of number base (use base-converter).\nFormula: truncated: r = a − b·trunc(a/b); floored: r = a − b·⌊a/b⌋; Euclidean: r = a − |b|·⌊a/|b|⌋ (0 ≤ r < |b|)\nDocs: https://tttkmbb.com/math/modulo.md","parameters":[{"name":"dividend","in":"query","required":true,"description":"The number being divided. Integers are exact; decimals are allowed.","schema":{"description":"The number being divided. Integers are exact; decimals are allowed.","type":"number","minimum":-1000000000000000,"maximum":1000000000000000,"examples":[17]},"example":17},{"name":"divisor","in":"query","required":true,"description":"The number to divide by; must not be 0.","schema":{"description":"The number to divide by; must not be 0.","type":"number","minimum":-1000000000000000,"maximum":1000000000000000,"examples":[5]},"example":5}],"x-calculator-id":"modulo","x-outputs":["remainder","quotient","floored_modulo","modulo","is_divisible","expression"],"x-example":{"inputs":{"dividend":17,"divisor":5},"expected":{"remainder":2,"quotient":3,"floored_modulo":2,"modulo":2,"is_divisible":false,"expression":"17 = 5 × 3 + 2"}},"responses":{"200":{"description":"Result with values remainder, quotient, floored_modulo, modulo, is_divisible, expression","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/base-converter":{"get":{"operationId":"convert_number_base","tags":["math"],"summary":"Number Base Converter","description":"Converts an integer written in one base (2–36) to another, using exact arbitrary-precision arithmetic, and always shows the binary, octal, decimal and hexadecimal forms.\n\nUse when: You need to convert between binary, octal, decimal, hexadecimal or any positional base up to 36, including large integers.\nDo not use when: The value has a fractional part, you need Roman numerals (use roman-numeral) or byte/bit unit conversions (use data-storage).\nFormula: value = Σ dᵢ × from_base^i (digits read right to left); the result digits are the remainders of repeated division by to_base\nDocs: https://tttkmbb.com/math/base-converter.md","parameters":[{"name":"value","in":"query","required":true,"description":"Integer written in the source base, e.g. 'ff' or '1010'. Letters a–z stand for digits 10–35 (case-insensitive); an optional leading '-' and the prefixes 0x, 0o, 0b are accepted.","schema":{"description":"Integer written in the source base, e.g. 'ff' or '1010'. Letters a–z stand for digits 10–35 (case-insensitive); an optional leading '-' and the prefixes 0x, 0o, 0b are accepted.","type":"string","examples":["255"]},"example":"255"},{"name":"from_base","in":"query","required":false,"description":"Base of the input value.","schema":{"description":"Base of the input value.","type":"integer","minimum":2,"maximum":36,"default":10,"examples":[10]},"example":10},{"name":"to_base","in":"query","required":false,"description":"Base of the result.","schema":{"description":"Base of the result.","type":"integer","minimum":2,"maximum":36,"default":2,"examples":[2]},"example":2}],"x-calculator-id":"base-converter","x-outputs":["result","decimal","decimal_value","binary","octal","hexadecimal"],"x-example":{"inputs":{"value":"ff","from_base":16,"to_base":10},"expected":{"result":"255","decimal":"255","decimal_value":255,"binary":"11111111","octal":"377","hexadecimal":"FF"}},"responses":{"200":{"description":"Result with values result, decimal, decimal_value, binary, octal, hexadecimal","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/scientific-notation":{"get":{"operationId":"convert_to_scientific_notation","tags":["math"],"summary":"Scientific Notation Converter","description":"Writes a number in normalised scientific notation m × 10^e with 1 ≤ |m| < 10, in E-notation, and in engineering notation (exponent a multiple of 3).\n\nUse when: You need a very large or very small number in scientific or engineering form, or its order of magnitude.\nDo not use when: You want to round a number to a given precision (use rounding) or compute a power (use exponent).\nFormula: e = ⌊log10|value|⌋, m = value / 10^e; engineering: e₃ = 3·⌊e/3⌋, m₃ = value / 10^e₃\nDocs: https://tttkmbb.com/math/scientific-notation.md","parameters":[{"name":"value","in":"query","required":true,"description":"Any number, e.g. 123400 or 0.000123.","schema":{"description":"Any number, e.g. 123400 or 0.000123.","type":"number","minimum":-1e+300,"maximum":1e+300,"examples":[123400]},"example":123400}],"x-calculator-id":"scientific-notation","x-outputs":["mantissa","exponent","scientific_notation","e_notation","engineering_notation","engineering_mantissa","engineering_exponent"],"x-example":{"inputs":{"value":123400},"expected":{"mantissa":1.234,"exponent":5,"scientific_notation":"1.234 × 10^5","e_notation":"1.234e5","engineering_notation":"123.4 × 10^3","engineering_mantissa":123.4,"engineering_exponent":3}},"responses":{"200":{"description":"Result with values mantissa, exponent, scientific_notation, e_notation, engineering_notation, engineering_mantissa, engineering_exponent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/circle":{"get":{"operationId":"calculate_circle_properties","tags":["geometry"],"summary":"Circle Calculator","description":"Computes the area, circumference, diameter and radius of a circle from either its radius or its diameter. Lengths are unit-agnostic: the area is in the square of the input unit.\n\nUse when: You know a circle's radius or diameter and need its area, circumference or the other dimension.\nDo not use when: The shape is an ellipse (use ellipse), a solid ball (use sphere) or a disc with thickness (use cylinder).\nFormula: r = radius (or diameter / 2); diameter = 2·r; circumference = 2·π·r; area = π·r²\nDocs: https://tttkmbb.com/geometry/circle.md","parameters":[{"name":"radius","in":"query","required":false,"description":"Radius of the circle. Give either radius or diameter. Unit: units.","schema":{"description":"Radius of the circle. Give either radius or diameter. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"example":3},{"name":"diameter","in":"query","required":false,"description":"Diameter of the circle (2 × radius). Used when radius is not given. Unit: units.","schema":{"description":"Diameter of the circle (2 × radius). Used when radius is not given. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[6],"x-unit":"units"},"example":6}],"x-calculator-id":"circle","x-outputs":["radius [units]","diameter [units]","circumference [units]","area [units²]"],"x-example":{"inputs":{"radius":3},"expected":{"radius":3,"diameter":6,"circumference":18.8496,"area":28.2743}},"responses":{"200":{"description":"Result with values radius, diameter, circumference, area","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/triangle-area":{"get":{"operationId":"calculate_triangle_area","tags":["geometry"],"summary":"Triangle Area Calculator","description":"Computes the area of any triangle from base and height, from three sides (Heron's formula) or from two sides and their included angle in degrees, and reports which method was used.\n\nUse when: You need the area of a triangle and know either its base and height, all three sides, or two sides and the angle between them.\nDo not use when: You need the missing sides or angles as well (use triangle-solver), or the triangle is right-angled and you want all its parts (use right-triangle).\nFormula: Method 1: area = base × height / 2. Method 2 (Heron): s = (side_a + side_b + side_c) / 2, area = √(s·(s − side_a)·(s − side_b)·(s − side_c)). Method 3: area = ½ · side_a · side_b · sin(included_angle_deg).\nDocs: https://tttkmbb.com/geometry/triangle-area.md","parameters":[{"name":"base","in":"query","required":false,"description":"Length of one side chosen as the base (method 1, with height). Unit: units.","schema":{"description":"Length of one side chosen as the base (method 1, with height). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[4],"x-unit":"units"},"example":4},{"name":"height","in":"query","required":false,"description":"Perpendicular distance from the base to the opposite vertex (method 1). Unit: units.","schema":{"description":"Perpendicular distance from the base to the opposite vertex (method 1). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"example":3},{"name":"side_a","in":"query","required":false,"description":"First side (methods 2 and 3). Unit: units.","schema":{"description":"First side (methods 2 and 3). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"example":3},{"name":"side_b","in":"query","required":false,"description":"Second side (methods 2 and 3). Unit: units.","schema":{"description":"Second side (methods 2 and 3). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[4],"x-unit":"units"},"example":4},{"name":"side_c","in":"query","required":false,"description":"Third side (method 2, Heron's formula). Unit: units.","schema":{"description":"Third side (method 2, Heron's formula). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"},"example":5},{"name":"included_angle_deg","in":"query","required":false,"description":"Angle between side_a and side_b in degrees (method 3). Unit: degrees.","schema":{"description":"Angle between side_a and side_b in degrees (method 3). Unit: degrees.","type":"number","exclusiveMinimum":0,"exclusiveMaximum":180,"examples":[90],"x-unit":"degrees"},"example":90}],"x-calculator-id":"triangle-area","x-outputs":["area [units²]","perimeter [units]","method"],"x-example":{"inputs":{"base":10,"height":4},"expected":{"area":20,"method":"Base × height / 2"}},"responses":{"200":{"description":"Result with values area, perimeter, method","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/right-triangle":{"get":{"operationId":"solve_right_triangle","tags":["geometry"],"summary":"Right Triangle Calculator","description":"Solves a right triangle from any two of its sides (two legs, or one leg and the hypotenuse) using the Pythagorean theorem, and returns all sides, the two acute angles in degrees, area, perimeter and the altitude to the hypotenuse.\n\nUse when: You know two sides of a right-angled triangle and need the third side, the angles or the area.\nDo not use when: The triangle has no right angle (use triangle-solver) or you only need the hypotenuse length (pythagorean gives just that).\nFormula: hypotenuse² = leg_a² + leg_b²; angle_a_deg = atan(leg_a / leg_b); angle_b_deg = 90 − angle_a_deg; area = leg_a × leg_b / 2; altitude = leg_a × leg_b / hypotenuse\nDocs: https://tttkmbb.com/geometry/right-triangle.md","parameters":[{"name":"leg_a","in":"query","required":false,"description":"First leg (side adjacent to the right angle). Unit: units.","schema":{"description":"First leg (side adjacent to the right angle). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"example":3},{"name":"leg_b","in":"query","required":false,"description":"Second leg (side adjacent to the right angle). Unit: units.","schema":{"description":"Second leg (side adjacent to the right angle). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[4],"x-unit":"units"},"example":4},{"name":"hypotenuse","in":"query","required":false,"description":"Side opposite the right angle; must be longer than either leg. Unit: units.","schema":{"description":"Side opposite the right angle; must be longer than either leg. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"},"example":5}],"x-calculator-id":"right-triangle","x-outputs":["leg_a [units]","leg_b [units]","hypotenuse [units]","angle_a_deg [degrees]","angle_b_deg [degrees]","area [units²]","perimeter [units]","altitude_to_hypotenuse [units]"],"x-example":{"inputs":{"leg_a":3,"leg_b":4},"expected":{"hypotenuse":5,"angle_a_deg":36.8699,"angle_b_deg":53.1301,"area":6,"perimeter":12,"altitude_to_hypotenuse":2.4}},"responses":{"200":{"description":"Result with values leg_a, leg_b, hypotenuse, angle_a_deg, angle_b_deg, area, perimeter, altitude_to_hypotenuse","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/triangle-solver":{"get":{"operationId":"solve_triangle","tags":["geometry"],"summary":"Triangle Solver","description":"Solves a triangle from three sides (SSS) or from two sides and their included angle in degrees (SAS) with the law of cosines, returning all sides, all angles, perimeter, area, inradius, circumradius and the classification by sides and by angles.\n\nUse when: You know three sides, or two sides and the angle between them, and need the remaining sides and angles, the area or the triangle type.\nDo not use when: You know two angles and a side (ASA/AAS) or a non-included angle (SSA), which this calculator does not accept; for right triangles from two sides use right-triangle.\nFormula: SAS: side_c = √(a² + b² − 2·a·b·cos C). Angles by the law of cosines: cos A = (b² + c² − a²) / (2·b·c), cos B = (a² + c² − b²) / (2·a·c), C = 180° − A − B. area = ½·a·b·sin C; inradius = area / s with s = perimeter / 2; circumradius = a·b·c / (4·area).\nDocs: https://tttkmbb.com/geometry/triangle-solver.md","parameters":[{"name":"side_a","in":"query","required":true,"description":"First side. Unit: units.","schema":{"description":"First side. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"example":3},{"name":"side_b","in":"query","required":true,"description":"Second side. Unit: units.","schema":{"description":"Second side. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[4],"x-unit":"units"},"example":4},{"name":"side_c","in":"query","required":false,"description":"Third side, opposite the angle between a and b (SSS). Omit for SAS. Unit: units.","schema":{"description":"Third side, opposite the angle between a and b (SSS). Omit for SAS. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"},"example":5},{"name":"angle_c_deg","in":"query","required":false,"description":"Included angle between side_a and side_b in degrees (SAS). Omit when side_c is given. Unit: degrees.","schema":{"description":"Included angle between side_a and side_b in degrees (SAS). Omit when side_c is given. Unit: degrees.","type":"number","exclusiveMinimum":0,"exclusiveMaximum":180,"examples":[90],"x-unit":"degrees"},"example":90}],"x-calculator-id":"triangle-solver","x-outputs":["side_a [units]","side_b [units]","side_c [units]","angle_a_deg [degrees]","angle_b_deg [degrees]","angle_c_deg [degrees]","perimeter [units]","area [units²]","inradius [units]","circumradius [units]","side_type","angle_type","method"],"x-example":{"inputs":{"side_a":3,"side_b":4,"side_c":5},"expected":{"angle_a_deg":36.8699,"angle_b_deg":53.1301,"angle_c_deg":90,"perimeter":12,"area":6,"inradius":1,"circumradius":2.5,"side_type":"scalene","angle_type":"right","method":"SSS"}},"responses":{"200":{"description":"Result with values side_a, side_b, side_c, angle_a_deg, angle_b_deg, angle_c_deg, perimeter, area, inradius, circumradius, side_type, angle_type, method","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/rectangle":{"get":{"operationId":"calculate_rectangle_properties","tags":["geometry"],"summary":"Rectangle Calculator","description":"Computes the area, perimeter and diagonal of a rectangle from its length and width. Lengths are unit-agnostic; the area is in the square of the input unit.\n\nUse when: You need the area, perimeter or diagonal of a rectangle or square (enter equal length and width).\nDo not use when: The shape is a box with depth (use rectangular-prism) or a slanted quadrilateral (use parallelogram or trapezoid).\nFormula: area = length × width; perimeter = 2 × (length + width); diagonal = √(length² + width²); diagonal_angle_deg = atan(width / length)\nDocs: https://tttkmbb.com/geometry/rectangle.md","parameters":[{"name":"length","in":"query","required":true,"description":"Length of the rectangle. Unit: units.","schema":{"description":"Length of the rectangle. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"},"example":5},{"name":"width","in":"query","required":true,"description":"Width of the rectangle. Unit: units.","schema":{"description":"Width of the rectangle. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"example":3}],"x-calculator-id":"rectangle","x-outputs":["area [units²]","perimeter [units]","diagonal [units]","diagonal_angle_deg [degrees]"],"x-example":{"inputs":{"length":5,"width":3},"expected":{"area":15,"perimeter":16,"diagonal":5.831,"diagonal_angle_deg":30.9638}},"responses":{"200":{"description":"Result with values area, perimeter, diagonal, diagonal_angle_deg","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/trapezoid":{"get":{"operationId":"calculate_trapezoid_properties","tags":["geometry"],"summary":"Trapezoid Calculator","description":"Computes the area and midsegment of a trapezoid (trapezium) from its two parallel sides and height, and the perimeter when both non-parallel legs are given.\n\nUse when: You need the area of a quadrilateral with exactly one pair of parallel sides, or its perimeter when all four sides are known.\nDo not use when: Both pairs of sides are parallel (use parallelogram or rectangle) or you only know the four sides without the height (the height cannot be derived without an angle in general).\nFormula: area = (base_a + base_b) / 2 × height; midsegment = (base_a + base_b) / 2; perimeter = base_a + base_b + leg_c + leg_d\nDocs: https://tttkmbb.com/geometry/trapezoid.md","parameters":[{"name":"base_a","in":"query","required":true,"description":"First parallel side. Unit: units.","schema":{"description":"First parallel side. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[8],"x-unit":"units"},"example":8},{"name":"base_b","in":"query","required":true,"description":"Second parallel side. Unit: units.","schema":{"description":"Second parallel side. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"},"example":5},{"name":"height","in":"query","required":true,"description":"Perpendicular distance between the two parallel sides. Unit: units.","schema":{"description":"Perpendicular distance between the two parallel sides. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[4],"x-unit":"units"},"example":4},{"name":"leg_c","in":"query","required":false,"description":"First non-parallel side (optional, needed for the perimeter). Unit: units.","schema":{"description":"First non-parallel side (optional, needed for the perimeter). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[4.5],"x-unit":"units"},"example":4.5},{"name":"leg_d","in":"query","required":false,"description":"Second non-parallel side (optional, needed for the perimeter). Unit: units.","schema":{"description":"Second non-parallel side (optional, needed for the perimeter). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"},"example":5}],"x-calculator-id":"trapezoid","x-outputs":["area [units²]","midsegment [units]","perimeter [units]"],"x-example":{"inputs":{"base_a":8,"base_b":5,"height":4,"leg_c":4.5,"leg_d":5},"expected":{"area":26,"midsegment":6.5,"perimeter":22.5}},"responses":{"200":{"description":"Result with values area, midsegment, perimeter","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/parallelogram":{"get":{"operationId":"calculate_parallelogram_properties","tags":["geometry"],"summary":"Parallelogram Calculator","description":"Computes the area of a parallelogram from base and height and, when the slanted side is given, its perimeter, the acute angle between base and side in degrees, and both diagonals.\n\nUse when: You need the area, perimeter, angles or diagonals of a quadrilateral whose opposite sides are parallel (including rhombi).\nDo not use when: All angles are right angles (use rectangle) or only one pair of sides is parallel (use trapezoid).\nFormula: area = base × height; perimeter = 2 × (base + side); angle_deg = asin(height / side); diagonals = √(base² + side² ± 2·base·√(side² − height²))\nDocs: https://tttkmbb.com/geometry/parallelogram.md","parameters":[{"name":"base","in":"query","required":true,"description":"Length of one side chosen as the base. Unit: units.","schema":{"description":"Length of one side chosen as the base. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[8],"x-unit":"units"},"example":8},{"name":"height","in":"query","required":true,"description":"Perpendicular distance between the base and its opposite side. Unit: units.","schema":{"description":"Perpendicular distance between the base and its opposite side. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"},"example":5},{"name":"side","in":"query","required":false,"description":"Length of the slanted side adjacent to the base (optional; must be at least the height). Unit: units.","schema":{"description":"Length of the slanted side adjacent to the base (optional; must be at least the height). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[6],"x-unit":"units"},"example":6}],"x-calculator-id":"parallelogram","x-outputs":["area [units²]","perimeter [units]","angle_deg [degrees]","diagonal_long [units]","diagonal_short [units]"],"x-example":{"inputs":{"base":8,"height":5,"side":6},"expected":{"area":40,"perimeter":28,"angle_deg":56.4427,"diagonal_long":12.372,"diagonal_short":6.8508}},"responses":{"200":{"description":"Result with values area, perimeter, angle_deg, diagonal_long, diagonal_short","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/regular-polygon":{"get":{"operationId":"calculate_regular_polygon_properties","tags":["geometry"],"summary":"Regular Polygon Calculator","description":"Computes the area, perimeter, interior and exterior angles in degrees, apothem, circumradius and number of diagonals of a regular polygon from its number of sides and side length.\n\nUse when: You need properties of an equilateral, equiangular polygon (pentagon, hexagon, octagon, …) with 3 to 100 sides.\nDo not use when: The polygon is irregular (split it into triangles and use triangle-area) or is a square, for which rectangle also works.\nFormula: With n = number_of_sides and s = side_length: area = n·s² / (4·tan(π/n)); perimeter = n·s; interior angle = (n − 2)·180°/n; exterior angle = 360°/n; apothem = s / (2·tan(π/n)); circumradius = s / (2·sin(π/n)); diagonals = n·(n − 3)/2\nDocs: https://tttkmbb.com/geometry/regular-polygon.md","parameters":[{"name":"number_of_sides","in":"query","required":true,"description":"Number of sides n (3 = equilateral triangle, 4 = square, 6 = hexagon, …).","schema":{"description":"Number of sides n (3 = equilateral triangle, 4 = square, 6 = hexagon, …).","type":"integer","minimum":3,"maximum":100,"examples":[6]},"example":6},{"name":"side_length","in":"query","required":true,"description":"Length of each side. Unit: units.","schema":{"description":"Length of each side. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[2],"x-unit":"units"},"example":2}],"x-calculator-id":"regular-polygon","x-outputs":["polygon_name","area [units²]","perimeter [units]","interior_angle_deg [degrees]","exterior_angle_deg [degrees]","interior_angle_sum_deg [degrees]","apothem [units]","circumradius [units]","diagonals"],"x-example":{"inputs":{"number_of_sides":6,"side_length":2},"expected":{"polygon_name":"hexagon","area":10.3923,"perimeter":12,"interior_angle_deg":120,"exterior_angle_deg":60,"interior_angle_sum_deg":720,"apothem":1.7321,"circumradius":2,"diagonals":9}},"responses":{"200":{"description":"Result with values polygon_name, area, perimeter, interior_angle_deg, exterior_angle_deg, interior_angle_sum_deg, apothem, circumradius, diagonals","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/ellipse":{"get":{"operationId":"calculate_ellipse_properties","tags":["geometry"],"summary":"Ellipse Calculator","description":"Computes the area, approximate perimeter (Ramanujan's second approximation), eccentricity and focal distances of an ellipse from its semi-major and semi-minor axes.\n\nUse when: You need the area or circumference of an ellipse or oval, or the position of its foci, from the two half-axes.\nDo not use when: Both axes are equal (use circle for exact results) or you need the arc length of part of an ellipse, which requires elliptic integrals.\nFormula: area = π·a·b; h = ((a − b) / (a + b))²; perimeter ≈ π·(a + b)·(1 + 3h / (10 + √(4 − 3h))) (Ramanujan 1914, second approximation); eccentricity = √(1 − b²/a²); c = √(a² − b²)\nDocs: https://tttkmbb.com/geometry/ellipse.md","parameters":[{"name":"semi_major_a","in":"query","required":true,"description":"Half of the longest diameter (centre to the farthest point). Unit: units.","schema":{"description":"Half of the longest diameter (centre to the farthest point). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"},"example":5},{"name":"semi_minor_b","in":"query","required":true,"description":"Half of the shortest diameter. If larger than a, the two are swapped. Unit: units.","schema":{"description":"Half of the shortest diameter. If larger than a, the two are swapped. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"example":3}],"x-calculator-id":"ellipse","x-outputs":["area [units²]","perimeter [units]","eccentricity","linear_eccentricity [units]","distance_between_foci [units]"],"x-example":{"inputs":{"semi_major_a":5,"semi_minor_b":3},"expected":{"area":47.1239,"perimeter":25.527,"eccentricity":0.8,"linear_eccentricity":4,"distance_between_foci":8}},"responses":{"200":{"description":"Result with values area, perimeter, eccentricity, linear_eccentricity, distance_between_foci","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/sphere":{"get":{"operationId":"calculate_sphere_properties","tags":["geometry"],"summary":"Sphere Calculator","description":"Computes the volume, surface area, diameter and great-circle circumference of a sphere from its radius. The volume is in the cube and the surface area in the square of the input unit.\n\nUse when: You need the volume or surface area of a ball, globe, bubble or planet from its radius.\nDo not use when: The object is a hemisphere or spherical cap (halve or use the cap formula), an ellipsoid, or you only need a flat circle (use circle).\nFormula: volume = 4/3 · π · radius³; surface_area = 4 · π · radius²; diameter = 2 · radius; great_circle_circumference = 2 · π · radius\nDocs: https://tttkmbb.com/geometry/sphere.md","parameters":[{"name":"radius","in":"query","required":true,"description":"Radius of the sphere (half the diameter). Unit: units.","schema":{"description":"Radius of the sphere (half the diameter). Unit: units.","type":"number","exclusiveMinimum":0,"examples":[2],"x-unit":"units"},"example":2}],"x-calculator-id":"sphere","x-outputs":["volume [units³]","surface_area [units²]","diameter [units]","great_circle_circumference [units]"],"x-example":{"inputs":{"radius":2},"expected":{"volume":33.5103,"surface_area":50.2655,"diameter":4,"great_circle_circumference":12.5664}},"responses":{"200":{"description":"Result with values volume, surface_area, diameter, great_circle_circumference","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/cylinder":{"get":{"operationId":"calculate_cylinder_properties","tags":["geometry"],"summary":"Cylinder Calculator","description":"Computes the volume, base area, lateral (curved) surface area and total surface area of a right circular cylinder from its radius and height.\n\nUse when: You need the capacity or surface of a can, tank, pipe, pillar or any straight circular cylinder.\nDo not use when: The cylinder is hollow (compute outer minus inner), tilted (oblique), or tapers to a point (use cone).\nFormula: volume = π · radius² · height; base_area = π · radius²; lateral_area = 2 · π · radius · height; total_surface_area = 2 · π · radius · (radius + height)\nDocs: https://tttkmbb.com/geometry/cylinder.md","parameters":[{"name":"radius","in":"query","required":true,"description":"Radius of the circular base. Unit: units.","schema":{"description":"Radius of the circular base. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"example":3},{"name":"height","in":"query","required":true,"description":"Distance between the two bases, measured perpendicular to them. Unit: units.","schema":{"description":"Distance between the two bases, measured perpendicular to them. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"units"},"example":5}],"x-calculator-id":"cylinder","x-outputs":["volume [units³]","base_area [units²]","lateral_area [units²]","total_surface_area [units²]"],"x-example":{"inputs":{"radius":3,"height":5},"expected":{"volume":141.3717,"base_area":28.2743,"lateral_area":94.2478,"total_surface_area":150.7964}},"responses":{"200":{"description":"Result with values volume, base_area, lateral_area, total_surface_area","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/cone":{"get":{"operationId":"calculate_cone_properties","tags":["geometry"],"summary":"Cone Calculator","description":"Computes the volume, slant height, base area, lateral (curved) surface area, total surface area and half-apex angle in degrees of a right circular cone from its base radius and height.\n\nUse when: You need the capacity or surface of a funnel, cone-shaped pile, roof or any right circular cone.\nDo not use when: The cone is truncated (frustum), oblique, or has a square base (use pyramid).\nFormula: volume = π · radius² · height / 3; slant_height = √(radius² + height²); base_area = π · radius²; lateral_area = π · radius · slant_height; total_surface_area = π · radius · (radius + slant_height); half_apex_angle_deg = atan(radius / height)\nDocs: https://tttkmbb.com/geometry/cone.md","parameters":[{"name":"radius","in":"query","required":true,"description":"Radius of the circular base. Unit: units.","schema":{"description":"Radius of the circular base. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"example":3},{"name":"height","in":"query","required":true,"description":"Perpendicular distance from the base to the apex. Unit: units.","schema":{"description":"Perpendicular distance from the base to the apex. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[4],"x-unit":"units"},"example":4}],"x-calculator-id":"cone","x-outputs":["volume [units³]","slant_height [units]","base_area [units²]","lateral_area [units²]","total_surface_area [units²]","half_apex_angle_deg [degrees]"],"x-example":{"inputs":{"radius":3,"height":4},"expected":{"volume":37.6991,"slant_height":5,"base_area":28.2743,"lateral_area":47.1239,"total_surface_area":75.3982,"half_apex_angle_deg":36.8699}},"responses":{"200":{"description":"Result with values volume, slant_height, base_area, lateral_area, total_surface_area, half_apex_angle_deg","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/rectangular-prism":{"get":{"operationId":"calculate_rectangular_prism_properties","tags":["geometry"],"summary":"Rectangular Prism Calculator","description":"Computes the volume, total surface area, space diagonal and total edge length of a rectangular prism (cuboid or box) from its length, width and height.\n\nUse when: You need the capacity, surface or longest internal dimension of a box, room, aquarium, container or any cuboid.\nDo not use when: The base is not a rectangle (use cylinder or pyramid) or you only need the floor area (use rectangle).\nFormula: volume = length · width · height; surface_area = 2 · (length·width + length·height + width·height); space_diagonal = √(length² + width² + height²); total_edge_length = 4 · (length + width + height)\nDocs: https://tttkmbb.com/geometry/rectangular-prism.md","parameters":[{"name":"length","in":"query","required":true,"description":"Length of the base. Unit: units.","schema":{"description":"Length of the base. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"units"},"example":3},{"name":"width","in":"query","required":true,"description":"Width of the base. Unit: units.","schema":{"description":"Width of the base. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[4],"x-unit":"units"},"example":4},{"name":"height","in":"query","required":true,"description":"Height of the prism. Unit: units.","schema":{"description":"Height of the prism. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[12],"x-unit":"units"},"example":12}],"x-calculator-id":"rectangular-prism","x-outputs":["volume [units³]","surface_area [units²]","space_diagonal [units]","total_edge_length [units]"],"x-example":{"inputs":{"length":3,"width":4,"height":12},"expected":{"volume":144,"surface_area":192,"space_diagonal":13,"total_edge_length":76}},"responses":{"200":{"description":"Result with values volume, surface_area, space_diagonal, total_edge_length","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/pyramid":{"get":{"operationId":"calculate_square_pyramid_properties","tags":["geometry"],"summary":"Square Pyramid Calculator","description":"Computes the volume, slant height, lateral edge, base area, lateral and total surface area and face slope in degrees of a right square pyramid from its base side and height.\n\nUse when: You need the volume or surface of a pyramid with a square base and the apex above the centre of the base.\nDo not use when: The base is a circle (use cone), a non-square rectangle or triangle, or the apex is off-centre (oblique pyramid).\nFormula: volume = base_side² · height / 3; slant_height = √(height² + (base_side/2)²); lateral_edge = √(height² + base_side²/2); lateral_area = 2 · base_side · slant_height; total_surface_area = base_side² + lateral_area; face_slope_deg = atan(2 · height / base_side)\nDocs: https://tttkmbb.com/geometry/pyramid.md","parameters":[{"name":"base_side","in":"query","required":true,"description":"Length of one side of the square base. Unit: units.","schema":{"description":"Length of one side of the square base. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[6],"x-unit":"units"},"example":6},{"name":"height","in":"query","required":true,"description":"Perpendicular distance from the base to the apex. Unit: units.","schema":{"description":"Perpendicular distance from the base to the apex. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[4],"x-unit":"units"},"example":4}],"x-calculator-id":"pyramid","x-outputs":["volume [units³]","slant_height [units]","lateral_edge [units]","base_area [units²]","lateral_area [units²]","total_surface_area [units²]","face_slope_deg [degrees]"],"x-example":{"inputs":{"base_side":6,"height":4},"expected":{"volume":48,"slant_height":5,"lateral_edge":5.831,"base_area":36,"lateral_area":60,"total_surface_area":96,"face_slope_deg":53.1301}},"responses":{"200":{"description":"Result with values volume, slant_height, lateral_edge, base_area, lateral_area, total_surface_area, face_slope_deg","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/descriptive-statistics":{"get":{"operationId":"calculate_descriptive_statistics","tags":["statistics"],"summary":"Descriptive Statistics Calculator","description":"Computes summary statistics for a list of numbers: count, sum, mean, median, mode, range, sample and population variance and standard deviation, standard error, coefficient of variation, quartiles (linear interpolation) and skewness.\n\nUse when: You have a set of numeric observations and need its central tendency, spread or quartiles, e.g. the standard deviation of a data set.\nDo not use when: You need a single percentile or the percentile rank of one value (use percentile), a standardised score (use z-score), or statistics of two paired variables (use correlation or linear-regression).\nFormula: mean = Σx / n; sample_variance = Σ(x − mean)² / (n − 1); population_variance = Σ(x − mean)² / n; standard_error = s / √n; CV% = 100·s / mean; quartile at p: rank = p·(n − 1), value = x(⌊rank⌋) + (rank − ⌊rank⌋)·(x(⌊rank⌋+1) − x(⌊rank⌋)) on sorted data; skewness G1 = n / ((n − 1)(n − 2)) · Σ((x − mean) / s)³\nDocs: https://tttkmbb.com/statistics/descriptive-statistics.md","parameters":[{"name":"values","in":"query","required":true,"description":"The data set, as a list of numbers (comma-separated or JSON array). At least 2 values are needed for sample statistics.","schema":{"description":"The data set, as a list of numbers (comma-separated or JSON array). At least 2 values are needed for sample statistics. Comma-separated list in query strings.","type":"string","minItems":1,"examples":[[2,4,4,4,5,5,7,9]]},"example":"2,4,4,4,5,5,7,9"}],"x-calculator-id":"descriptive-statistics","x-outputs":["count","sum","mean","median","mode","mode_count","min","max","range","sample_variance","sample_std_dev","population_variance","population_std_dev","standard_error","coefficient_of_variation_percent [%]","q1","q3","iqr","skewness"],"x-example":{"inputs":{"values":[2,4,4,4,5,5,7,9]},"expected":{"count":8,"sum":40,"mean":5,"median":4.5,"mode":"4","mode_count":3,"min":2,"max":9,"range":7,"sample_variance":4.5714,"sample_std_dev":2.1381,"population_variance":4,"population_std_dev":2,"standard_error":0.7559,"coefficient_of_variation_percent":42.76,"q1":4,"q3":5.5,"iqr":1.5,"skewness":0.8185}},"responses":{"200":{"description":"Result with values count, sum, mean, median, mode, mode_count, min, max, range, sample_variance, sample_std_dev, population_variance, population_std_dev, standard_error, coefficient_of_variation_percent, q1, q3, iqr, skewness","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/z-score":{"get":{"operationId":"calculate_z_score","tags":["statistics"],"summary":"Z-Score Calculator","description":"Standardises a value against a mean and standard deviation (z = (x − μ) / σ) and reports the corresponding percentile and tail probabilities under the normal distribution.\n\nUse when: You need how many standard deviations a value lies from the mean, or the percentile a value corresponds to in a normally distributed population (test scores, measurements, quality control).\nDo not use when: You need the probability between two values or the density (use normal-distribution), the data are clearly not normal, or you need the empirical percentile rank within an actual data set (use percentile).\nFormula: z = (value − mean) / std_dev; percentile = 100 × Φ(z), where Φ is the standard normal CDF\nDocs: https://tttkmbb.com/statistics/z-score.md","parameters":[{"name":"value","in":"query","required":true,"description":"The observation to standardise.","schema":{"description":"The observation to standardise.","type":"number","examples":[85]},"example":85},{"name":"mean","in":"query","required":true,"description":"Mean of the population or reference distribution.","schema":{"description":"Mean of the population or reference distribution.","type":"number","examples":[70]},"example":70},{"name":"std_dev","in":"query","required":true,"description":"Standard deviation of the population or reference distribution.","schema":{"description":"Standard deviation of the population or reference distribution.","type":"number","exclusiveMinimum":0,"examples":[10]},"example":10}],"x-calculator-id":"z-score","x-outputs":["z_score","percentile [%]","probability_below","probability_above","interpretation"],"x-example":{"inputs":{"value":1.96,"mean":0,"std_dev":1},"expected":{"z_score":1.96,"percentile":97.5,"probability_below":0.975,"probability_above":0.025}},"responses":{"200":{"description":"Result with values z_score, percentile, probability_below, probability_above, interpretation","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/normal-distribution":{"get":{"operationId":"calculate_normal_distribution_probability","tags":["statistics"],"summary":"Normal Distribution Calculator","description":"Computes cumulative probabilities P(X < x), P(X > x) and P(x < X < x2) and the density for a normal (Gaussian) distribution with a given mean and standard deviation.\n\nUse when: You need the probability that a normally distributed quantity falls below, above or between given values, or the z-scores of those values.\nDo not use when: The variable is a count of successes or events (use binomial-distribution or poisson-distribution), or you need the value at a given probability from real data (use percentile).\nFormula: z = (x − mean) / std_dev; P(X < x) = Φ(z); P(X > x) = 1 − Φ(z); P(x < X < x2) = |Φ(z2) − Φ(z)|; f(x) = exp(−z² / 2) / (std_dev · √(2π))\nDocs: https://tttkmbb.com/statistics/normal-distribution.md","parameters":[{"name":"mean","in":"query","required":false,"description":"Mean of the distribution (default 0 = standard normal).","schema":{"description":"Mean of the distribution (default 0 = standard normal).","type":"number","default":0,"examples":[100]},"example":100},{"name":"std_dev","in":"query","required":false,"description":"Standard deviation of the distribution (default 1 = standard normal).","schema":{"description":"Standard deviation of the distribution (default 1 = standard normal).","type":"number","exclusiveMinimum":0,"default":1,"examples":[15]},"example":15},{"name":"x","in":"query","required":true,"description":"The value at which to evaluate the distribution.","schema":{"description":"The value at which to evaluate the distribution.","type":"number","examples":[85]},"example":85},{"name":"x2","in":"query","required":false,"description":"Optional second value; when given, the probability between x and x2 is also returned.","schema":{"description":"Optional second value; when given, the probability between x and x2 is also returned.","type":"number","examples":[115]},"example":115}],"x-calculator-id":"normal-distribution","x-outputs":["z_score","probability_below","probability_above","probability_density","z_score_2","probability_between"],"x-example":{"inputs":{"x":1.96},"expected":{"z_score":1.96,"probability_below":0.975,"probability_above":0.025,"probability_density":0.05844}},"responses":{"200":{"description":"Result with values z_score, probability_below, probability_above, probability_density, z_score_2, probability_between","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/confidence-interval":{"get":{"operationId":"calculate_confidence_interval","tags":["statistics"],"summary":"Confidence Interval Calculator","description":"Computes a confidence interval for a population mean from the sample mean, standard deviation and sample size using the normal (z) critical value: mean ± z · s / √n.\n\nUse when: You have a sample mean, its standard deviation and the sample size and want the interval that likely contains the population mean at a given confidence level.\nDo not use when: The statistic is a proportion or survey percentage (use margin-of-error), or the sample is small (n < 30) with an unknown population SD, where a t-based interval is the correct choice and this z interval is slightly too narrow.\nFormula: z = Φ⁻¹(1 − (1 − confidence_level_percent/100) / 2); standard_error = std_dev / √sample_size; margin_of_error = z × standard_error; interval = sample_mean ± margin_of_error\nDocs: https://tttkmbb.com/statistics/confidence-interval.md","parameters":[{"name":"sample_mean","in":"query","required":true,"description":"Mean of the sample.","schema":{"description":"Mean of the sample.","type":"number","examples":[100]},"example":100},{"name":"std_dev","in":"query","required":true,"description":"Population standard deviation σ if known, otherwise the sample standard deviation s.","schema":{"description":"Population standard deviation σ if known, otherwise the sample standard deviation s.","type":"number","exclusiveMinimum":0,"examples":[15]},"example":15},{"name":"sample_size","in":"query","required":true,"description":"Number of observations in the sample.","schema":{"description":"Number of observations in the sample.","type":"integer","minimum":2,"examples":[36]},"example":36},{"name":"confidence_level_percent","in":"query","required":false,"description":"Confidence level in percent (commonly 90, 95 or 99). Determines the critical z value. Unit: %.","schema":{"description":"Confidence level in percent (commonly 90, 95 or 99). Determines the critical z value. Unit: %.","type":"number","exclusiveMinimum":0,"exclusiveMaximum":100,"default":95,"examples":[95],"x-unit":"%"},"example":95}],"x-calculator-id":"confidence-interval","x-outputs":["z_value","standard_error","margin_of_error","lower_bound","upper_bound"],"x-example":{"inputs":{"sample_mean":100,"std_dev":15,"sample_size":36,"confidence_level_percent":95},"expected":{"z_value":1.96,"standard_error":2.5,"margin_of_error":4.9,"lower_bound":95.1,"upper_bound":104.9}},"responses":{"200":{"description":"Result with values z_value, standard_error, margin_of_error, lower_bound, upper_bound","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/sample-size":{"get":{"operationId":"calculate_sample_size","tags":["statistics"],"summary":"Sample Size Calculator","description":"Computes the number of respondents needed to estimate a population proportion within a given margin of error at a given confidence level (Cochran's formula), with an optional finite population correction.\n\nUse when: You are planning a survey, poll or A/B test on a proportion and need to know how many people to sample for a target margin of error.\nDo not use when: You already have a sample and want its margin of error (use margin-of-error), or you are estimating a mean rather than a proportion (the formula would need the standard deviation instead of p(1 − p)).\nFormula: n0 = z² · p · (1 − p) / e², with p = expected_proportion_percent/100 and e = margin_of_error_percent/100; with population_size N: n = n0 / (1 + (n0 − 1) / N); both rounded up\nDocs: https://tttkmbb.com/statistics/sample-size.md","parameters":[{"name":"confidence_level_percent","in":"query","required":false,"description":"Confidence level in percent (commonly 90, 95 or 99). Determines the critical z value. Unit: %.","schema":{"description":"Confidence level in percent (commonly 90, 95 or 99). Determines the critical z value. Unit: %.","type":"number","exclusiveMinimum":0,"exclusiveMaximum":100,"default":95,"examples":[95],"x-unit":"%"},"example":95},{"name":"margin_of_error_percent","in":"query","required":true,"description":"Acceptable half-width of the confidence interval, in percentage points (5 means ±5 %). Unit: %.","schema":{"description":"Acceptable half-width of the confidence interval, in percentage points (5 means ±5 %). Unit: %.","type":"number","maximum":50,"exclusiveMinimum":0,"examples":[5],"x-unit":"%"},"example":5},{"name":"expected_proportion_percent","in":"query","required":false,"description":"Anticipated percentage with the attribute. 50 % is the conservative choice giving the largest sample. Unit: %.","schema":{"description":"Anticipated percentage with the attribute. 50 % is the conservative choice giving the largest sample. Unit: %.","type":"number","minimum":1,"maximum":99,"default":50,"examples":[50],"x-unit":"%"},"example":50},{"name":"population_size","in":"query","required":false,"description":"Optional total population size N. When given, the finite population correction is applied; omit for large or unknown populations.","schema":{"description":"Optional total population size N. When given, the finite population correction is applied; omit for large or unknown populations.","type":"integer","minimum":2,"examples":[1000]},"example":1000}],"x-calculator-id":"sample-size","x-outputs":["z_value","sample_size","sample_size_infinite_population"],"x-example":{"inputs":{"confidence_level_percent":95,"margin_of_error_percent":5,"expected_proportion_percent":50},"expected":{"z_value":1.96,"sample_size":385,"sample_size_infinite_population":385}},"responses":{"200":{"description":"Result with values z_value, sample_size, sample_size_infinite_population","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/margin-of-error":{"get":{"operationId":"calculate_margin_of_error","tags":["statistics"],"summary":"Margin of Error Calculator","description":"Computes the margin of error (half-width of the confidence interval) of a sample proportion from the sample size, confidence level and observed percentage, with an optional finite population correction.\n\nUse when: You have poll or survey results (n respondents, x % answering a certain way) and need the ± margin at a confidence level.\nDo not use when: You are still planning the survey and need the required sample size (use sample-size), or the statistic is a mean rather than a percentage (use confidence-interval).\nFormula: margin = z · √(p (1 − p) / sample_size) × 100, with p = proportion_percent/100; with population_size N the margin is multiplied by √((N − sample_size) / (N − 1))\nDocs: https://tttkmbb.com/statistics/margin-of-error.md","parameters":[{"name":"sample_size","in":"query","required":true,"description":"Number of respondents or observations.","schema":{"description":"Number of respondents or observations.","type":"integer","minimum":1,"examples":[1000]},"example":1000},{"name":"confidence_level_percent","in":"query","required":false,"description":"Confidence level in percent (commonly 90, 95 or 99). Determines the critical z value. Unit: %.","schema":{"description":"Confidence level in percent (commonly 90, 95 or 99). Determines the critical z value. Unit: %.","type":"number","exclusiveMinimum":0,"exclusiveMaximum":100,"default":95,"examples":[95],"x-unit":"%"},"example":95},{"name":"proportion_percent","in":"query","required":false,"description":"Percentage of the sample with the attribute. 50 % gives the largest (most conservative) margin. Unit: %.","schema":{"description":"Percentage of the sample with the attribute. 50 % gives the largest (most conservative) margin. Unit: %.","type":"number","minimum":0,"maximum":100,"default":50,"examples":[50],"x-unit":"%"},"example":50},{"name":"population_size","in":"query","required":false,"description":"Optional total population size N. When given, the finite population correction is applied; omit for large or unknown populations.","schema":{"description":"Optional total population size N. When given, the finite population correction is applied; omit for large or unknown populations.","type":"integer","minimum":2,"examples":[1000]},"example":1000}],"x-calculator-id":"margin-of-error","x-outputs":["z_value","standard_error_percent [%]","margin_of_error_percent [%]","lower_bound_percent [%]","upper_bound_percent [%]"],"x-example":{"inputs":{"sample_size":1000,"confidence_level_percent":95,"proportion_percent":50},"expected":{"z_value":1.96,"standard_error_percent":1.5811,"margin_of_error_percent":3.1,"lower_bound_percent":46.9,"upper_bound_percent":53.1}},"responses":{"200":{"description":"Result with values z_value, standard_error_percent, margin_of_error_percent, lower_bound_percent, upper_bound_percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/binomial-distribution":{"get":{"operationId":"calculate_binomial_probability","tags":["statistics"],"summary":"Binomial Distribution Calculator","description":"Computes the probability of exactly, at most, at least, fewer than or more than k successes in n independent trials with success probability p, plus the mean, variance and standard deviation of the distribution.\n\nUse when: You have a fixed number of independent yes/no trials with a constant success probability (coin flips, defect counts in a batch, conversions among n visitors) and need the probability of a number of successes.\nDo not use when: Trials are not independent or p changes, the number of trials is not fixed, or you count events over time or space at an average rate (use poisson-distribution).\nFormula: P(X = k) = C(n, k) · p^k · (1 − p)^(n − k); P(X ≤ k) = Σ_{i=0..k} P(X = i); P(X ≥ k) = Σ_{i=k..n} P(X = i); mean = n·p; variance = n·p·(1 − p)\nDocs: https://tttkmbb.com/statistics/binomial-distribution.md","parameters":[{"name":"trials","in":"query","required":true,"description":"Total number of independent trials.","schema":{"description":"Total number of independent trials.","type":"integer","minimum":1,"maximum":100000,"examples":[10]},"example":10},{"name":"successes","in":"query","required":true,"description":"Number of successes of interest (0 ≤ k ≤ n).","schema":{"description":"Number of successes of interest (0 ≤ k ≤ n).","type":"integer","minimum":0,"maximum":100000,"examples":[3]},"example":3},{"name":"probability_of_success","in":"query","required":true,"description":"Probability of success on a single trial, as a number between 0 and 1 (0.5 for 50 %), not a percentage.","schema":{"description":"Probability of success on a single trial, as a number between 0 and 1 (0.5 for 50 %), not a percentage.","type":"number","minimum":0,"maximum":1,"examples":[0.5]},"example":0.5}],"x-calculator-id":"binomial-distribution","x-outputs":["probability_exact","probability_at_most","probability_at_least","probability_less_than","probability_more_than","mean","variance","std_dev"],"x-example":{"inputs":{"trials":10,"successes":3,"probability_of_success":0.5},"expected":{"probability_exact":0.117188,"probability_at_most":0.171875,"probability_at_least":0.945313,"probability_less_than":0.054688,"probability_more_than":0.828125,"mean":5,"variance":2.5,"std_dev":1.5811}},"responses":{"200":{"description":"Result with values probability_exact, probability_at_most, probability_at_least, probability_less_than, probability_more_than, mean, variance, std_dev","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/poisson-distribution":{"get":{"operationId":"calculate_poisson_probability","tags":["statistics"],"summary":"Poisson Distribution Calculator","description":"Computes the probability of exactly, at most, at least, fewer than or more than k events when events occur independently at a constant average rate λ per interval, plus the mean, variance and standard deviation.\n\nUse when: You count independent events over a fixed interval of time or space with a known average rate (calls per hour, defects per metre, arrivals per minute) and need the probability of a given count.\nDo not use when: The number of trials is fixed and each has a success probability (use binomial-distribution), the rate varies over the interval, or events cluster (over-dispersion).\nFormula: P(X = k) = e^(−λ) · λ^k / k!; P(X ≤ k) = Σ_{i=0..k} P(X = i); P(X ≥ k) = 1 − P(X ≤ k − 1); mean = variance = λ\nDocs: https://tttkmbb.com/statistics/poisson-distribution.md","parameters":[{"name":"lambda","in":"query","required":true,"description":"Expected number of events in the interval (mean of the distribution).","schema":{"description":"Expected number of events in the interval (mean of the distribution).","type":"number","maximum":10000,"exclusiveMinimum":0,"examples":[3]},"example":3},{"name":"events","in":"query","required":true,"description":"Number of events of interest.","schema":{"description":"Number of events of interest.","type":"integer","minimum":0,"maximum":100000,"examples":[2]},"example":2}],"x-calculator-id":"poisson-distribution","x-outputs":["probability_exact","probability_at_most","probability_at_least","probability_less_than","probability_more_than","mean","variance","std_dev"],"x-example":{"inputs":{"lambda":3,"events":2},"expected":{"probability_exact":0.224042,"probability_at_most":0.42319,"probability_at_least":0.800852,"probability_less_than":0.199148,"probability_more_than":0.57681,"mean":3,"variance":3,"std_dev":1.7321}},"responses":{"200":{"description":"Result with values probability_exact, probability_at_most, probability_at_least, probability_less_than, probability_more_than, mean, variance, std_dev","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/probability-of-events":{"get":{"operationId":"calculate_event_probabilities","tags":["statistics"],"summary":"Probability of Two Events Calculator","description":"Combines the probabilities of two events A and B that are either independent or mutually exclusive into the probabilities of both, at least one, exactly one, one but not the other, and neither occurring.\n\nUse when: You know P(A) and P(B) and how the events relate (independent or mutually exclusive) and need P(A and B), P(A or B), P(neither) or P(exactly one).\nDo not use when: The events are dependent with a known conditional probability (apply P(A and B) = P(A)·P(B|A) directly), you need the probability of k successes in repeated trials (use binomial-distribution), or you need an expected payoff (use expected-value).\nFormula: Independent: P(A and B) = P(A)·P(B). Mutually exclusive: P(A and B) = 0. Then P(A or B) = P(A) + P(B) − P(A and B); P(A not B) = P(A) − P(A and B); P(exactly one) = P(A) + P(B) − 2·P(A and B); P(neither) = 1 − P(A or B)\nDocs: https://tttkmbb.com/statistics/probability-of-events.md","parameters":[{"name":"probability_a","in":"query","required":true,"description":"Probability of event A, as a number between 0 and 1 (0.25 for 25 %).","schema":{"description":"Probability of event A, as a number between 0 and 1 (0.25 for 25 %).","type":"number","minimum":0,"maximum":1,"examples":[0.5]},"example":0.5},{"name":"probability_b","in":"query","required":true,"description":"Probability of event B, between 0 and 1.","schema":{"description":"Probability of event B, between 0 and 1.","type":"number","minimum":0,"maximum":1,"examples":[0.5]},"example":0.5},{"name":"relationship","in":"query","required":false,"description":"How A and B relate: independent events multiply (P(A and B) = P(A)·P(B)); mutually exclusive events cannot occur together (P(A and B) = 0). One of: independent, mutually_exclusive.","schema":{"description":"How A and B relate: independent events multiply (P(A and B) = P(A)·P(B)); mutually exclusive events cannot occur together (P(A and B) = 0).","type":"string","enum":["independent","mutually_exclusive"],"default":"independent","examples":["independent"]},"example":"independent"}],"x-calculator-id":"probability-of-events","x-outputs":["probability_a_and_b","probability_a_or_b","probability_a_not_b","probability_b_not_a","probability_exactly_one","probability_neither"],"x-example":{"inputs":{"probability_a":0.5,"probability_b":0.5,"relationship":"independent"},"expected":{"probability_a_and_b":0.25,"probability_a_or_b":0.75,"probability_a_not_b":0.25,"probability_b_not_a":0.25,"probability_exactly_one":0.5,"probability_neither":0.25}},"responses":{"200":{"description":"Result with values probability_a_and_b, probability_a_or_b, probability_a_not_b, probability_b_not_a, probability_exactly_one, probability_neither","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/correlation":{"get":{"operationId":"calculate_correlation","tags":["statistics"],"summary":"Correlation Coefficient Calculator","description":"Computes the Pearson product-moment correlation coefficient r, the coefficient of determination r², and the sample covariance for two paired lists of numbers, with a strength/direction interpretation.\n\nUse when: You have paired measurements of two numeric variables and want to quantify the strength and direction of their linear relationship.\nDo not use when: You need the fitted line or predictions (use linear-regression), the relationship is clearly non-linear or the data are ranks/ordinal (Spearman's rank correlation is more appropriate), or you only have one variable (use descriptive-statistics).\nFormula: r = Σ(x − x̄)(y − ȳ) / √(Σ(x − x̄)² · Σ(y − ȳ)²); r² = r × r; covariance = Σ(x − x̄)(y − ȳ) / (n − 1)\nDocs: https://tttkmbb.com/statistics/correlation.md","parameters":[{"name":"x_values","in":"query","required":true,"description":"Independent (explanatory) variable, one number per observation.","schema":{"description":"Independent (explanatory) variable, one number per observation. Comma-separated list in query strings.","type":"string","minItems":3,"examples":[[1,2,3,4,5]]},"example":"1,2,3,4,5"},{"name":"y_values","in":"query","required":true,"description":"Dependent (response) variable, in the same order as x_values.","schema":{"description":"Dependent (response) variable, in the same order as x_values. Comma-separated list in query strings.","type":"string","minItems":3,"examples":[[2,4,5,4,5]]},"example":"2,4,5,4,5"}],"x-calculator-id":"correlation","x-outputs":["sample_size","pearson_r","r_squared","covariance","interpretation"],"x-example":{"inputs":{"x_values":[1,2,3,4,5],"y_values":[2,4,5,4,5]},"expected":{"sample_size":5,"pearson_r":0.7746,"r_squared":0.6,"covariance":1.5,"interpretation":"Strong positive linear correlation"}},"responses":{"200":{"description":"Result with values sample_size, pearson_r, r_squared, covariance, interpretation","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/linear-regression":{"get":{"operationId":"calculate_linear_regression","tags":["statistics"],"summary":"Linear Regression Calculator","description":"Fits an ordinary least-squares line to paired (x, y) data and returns the slope, intercept, equation, Pearson r, R², the standard error of the estimate and an optional prediction for a new x.\n\nUse when: You want the best-fit straight line through paired data, its equation, or a predicted y for a given x (trend lines, calibration curves, simple forecasting).\nDo not use when: The relationship is curved or has several predictors (needs polynomial or multiple regression), or you only need the strength of association (use correlation).\nFormula: slope = Σ(x − x̄)(y − ȳ) / Σ(x − x̄)²; intercept = ȳ − slope · x̄; r = Σ(x − x̄)(y − ȳ) / √(Σ(x − x̄)² Σ(y − ȳ)²); ŷ(x_new) = intercept + slope · x_new\nDocs: https://tttkmbb.com/statistics/linear-regression.md","parameters":[{"name":"x_values","in":"query","required":true,"description":"Independent (explanatory) variable, one number per observation.","schema":{"description":"Independent (explanatory) variable, one number per observation. Comma-separated list in query strings.","type":"string","minItems":2,"examples":[[1,2,3,4,5]]},"example":"1,2,3,4,5"},{"name":"y_values","in":"query","required":true,"description":"Dependent (response) variable, in the same order as x_values.","schema":{"description":"Dependent (response) variable, in the same order as x_values. Comma-separated list in query strings.","type":"string","minItems":2,"examples":[[2,4,5,4,5]]},"example":"2,4,5,4,5"},{"name":"x_new","in":"query","required":false,"description":"Optional x value at which to evaluate the fitted line.","schema":{"description":"Optional x value at which to evaluate the fitted line.","type":"number","examples":[6]},"example":6}],"x-calculator-id":"linear-regression","x-outputs":["slope","intercept","equation","pearson_r","r_squared","standard_error_of_estimate","sample_size","predicted_y"],"x-example":{"inputs":{"x_values":[1,2,3,4,5],"y_values":[2,4,5,4,5],"x_new":6},"expected":{"slope":0.6,"intercept":2.2,"equation":"y = 0.6x + 2.2","pearson_r":0.7746,"r_squared":0.6,"standard_error_of_estimate":0.8944,"sample_size":5,"predicted_y":5.8}},"responses":{"200":{"description":"Result with values slope, intercept, equation, pearson_r, r_squared, standard_error_of_estimate, sample_size, predicted_y","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/weighted-average":{"get":{"operationId":"calculate_weighted_average","tags":["statistics"],"summary":"Weighted Average Calculator","description":"Computes the weighted arithmetic mean Σ(w·x) / Σw of a list of values and a matching list of weights, along with the total weight and the unweighted mean for comparison.\n\nUse when: Values contribute unequally to an average: course grades with credit weights, portfolio returns by allocation, survey answers with sampling weights, average price over different quantities.\nDo not use when: All items count equally (use descriptive-statistics for the plain mean), or the weights are probabilities of outcomes (use expected-value, which also gives the variance).\nFormula: weighted_average = Σ(values_i × weights_i) / Σ weights_i\nDocs: https://tttkmbb.com/statistics/weighted-average.md","parameters":[{"name":"values","in":"query","required":true,"description":"The values to average.","schema":{"description":"The values to average. Comma-separated list in query strings.","type":"string","minItems":1,"examples":[[90,80,70]]},"example":"90,80,70"},{"name":"weights","in":"query","required":true,"description":"Non-negative weight for each value, in the same order (percentages, credits, quantities); they need not sum to 1.","schema":{"description":"Non-negative weight for each value, in the same order (percentages, credits, quantities); they need not sum to 1. Comma-separated list in query strings.","type":"string","minItems":1,"examples":[[0.5,0.3,0.2]]},"example":"0.5,0.3,0.2"}],"x-calculator-id":"weighted-average","x-outputs":["weighted_average","total_weight","weighted_sum","simple_average","count"],"x-example":{"inputs":{"values":[90,80,70],"weights":[0.5,0.3,0.2]},"expected":{"weighted_average":83,"total_weight":1,"weighted_sum":83,"simple_average":80,"count":3}},"responses":{"200":{"description":"Result with values weighted_average, total_weight, weighted_sum, simple_average, count","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/percentile":{"get":{"operationId":"calculate_percentile","tags":["statistics"],"summary":"Percentile Calculator","description":"For a list of numbers, computes the value at a given percentile (linear interpolation, as in Excel PERCENTILE.INC) and/or the percentile rank of a given value (percentage of values below it, counting ties as half).\n\nUse when: You need the k-th percentile of a data set (e.g. the 90th percentile response time) or want to know what percentile a particular value falls at within the data.\nDo not use when: You want a percentile from a normal distribution rather than actual data (use z-score or normal-distribution), or you need quartiles together with other summary statistics (use descriptive-statistics).\nFormula: value at percentile p: rank = p/100 · (n − 1) on the sorted data, value = x(⌊rank⌋) + (rank − ⌊rank⌋) · (x(⌊rank⌋+1) − x(⌊rank⌋)); percentile rank of v = 100 · (count(x < v) + 0.5 · count(x = v)) / n\nDocs: https://tttkmbb.com/statistics/percentile.md","parameters":[{"name":"values","in":"query","required":true,"description":"The data set (order does not matter).","schema":{"description":"The data set (order does not matter). Comma-separated list in query strings.","type":"string","minItems":1,"examples":[[15,20,35,40,50]]},"example":"15,20,35,40,50"},{"name":"percentile","in":"query","required":false,"description":"Percentile between 0 and 100 whose value you want (e.g. 90 for the 90th percentile). Give this, value, or both. Unit: %.","schema":{"description":"Percentile between 0 and 100 whose value you want (e.g. 90 for the 90th percentile). Give this, value, or both. Unit: %.","type":"number","minimum":0,"maximum":100,"examples":[40],"x-unit":"%"},"example":40},{"name":"value","in":"query","required":false,"description":"A value whose percentile rank within the data you want. Give this, percentile, or both.","schema":{"description":"A value whose percentile rank within the data you want. Give this, percentile, or both.","type":"number","examples":[35]},"example":35}],"x-calculator-id":"percentile","x-outputs":["value_at_percentile","percentile_rank [%]","count_below","count_equal","count"],"x-example":{"inputs":{"values":[15,20,35,40,50],"percentile":40},"expected":{"value_at_percentile":29,"count":5}},"responses":{"200":{"description":"Result with values value_at_percentile, percentile_rank, count_below, count_equal, count","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/expected-value":{"get":{"operationId":"calculate_expected_value","tags":["statistics"],"summary":"Expected Value Calculator","description":"Computes the expected value E[X] = Σ x·p(x), the variance and the standard deviation of a discrete random variable from its list of outcomes and their probabilities.\n\nUse when: You have a set of possible outcomes (payoffs, scores, counts) with known probabilities and need the long-run average and its spread: bets, lotteries, insurance, decision analysis.\nDo not use when: The probabilities are unknown and you have observed data instead (use descriptive-statistics), or the weights are not probabilities (use weighted-average).\nFormula: E[X] = Σ values_i × probabilities_i; variance = Σ probabilities_i × (values_i − E[X])²; std_dev = √variance\nDocs: https://tttkmbb.com/statistics/expected-value.md","parameters":[{"name":"values","in":"query","required":true,"description":"Numeric value of each possible outcome (negative for losses).","schema":{"description":"Numeric value of each possible outcome (negative for losses). Comma-separated list in query strings.","type":"string","minItems":1,"examples":[[0,10,100]]},"example":"0,10,100"},{"name":"probabilities","in":"query","required":true,"description":"Probability of each outcome as a fraction between 0 and 1, in the same order as values; they must sum to 1 (within 0.001).","schema":{"description":"Probability of each outcome as a fraction between 0 and 1, in the same order as values; they must sum to 1 (within 0.001). Comma-separated list in query strings.","type":"string","minItems":1,"examples":[[0.7,0.25,0.05]]},"example":"0.7,0.25,0.05"}],"x-calculator-id":"expected-value","x-outputs":["expected_value","variance","std_dev","count"],"x-example":{"inputs":{"values":[0,10,100],"probabilities":[0.7,0.25,0.05]},"expected":{"expected_value":7.5,"variance":468.75,"std_dev":21.6506,"count":3}},"responses":{"200":{"description":"Result with values expected_value, variance, std_dev, count","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/length":{"get":{"operationId":"convert_length","tags":["conversion"],"summary":"Length Converter","description":"Converts a length or distance between metric (nm to km), imperial/US (in, ft, yd, mi), nautical and astronomical units using exact NIST factors (1 in = 0.0254 m, 1 mi = 1609.344 m).\n\nUse when: You need a distance, height or length in a different unit, e.g. miles to kilometres, feet to metres or inches to centimetres.\nDo not use when: You need an area (use area), a volume (use volume), or a speed (use speed); for walking distance from step counts use steps-to-distance.\nFormula: result = value × factor, factor = (1 from_unit in m) / (1 to_unit in m)\nDocs: https://tttkmbb.com/conversion/length.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[5]},"example":5},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: nm, um, mm, cm, m, km, in, ft, yd, mi, nmi, fathom, au, ly; spelled-out names and common abbreviations are accepted too. One of: nm, um, mm, cm, m, km, in, ft, yd, mi, nmi, fathom, au, ly.","schema":{"description":"Unit of the input value. Accepted symbols: nm, um, mm, cm, m, km, in, ft, yd, mi, nmi, fathom, au, ly; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["nm","um","mm","cm","m","km","in","ft","yd","mi","nmi","fathom","au","ly"],"examples":["mi"]},"example":"mi"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: nm, um, mm, cm, m, km, in, ft, yd, mi, nmi, fathom, au, ly.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["nm","um","mm","cm","m","km","in","ft","yd","mi","nmi","fathom","au","ly"],"examples":["km"]},"example":"km"}],"x-calculator-id":"length","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":5,"from_unit":"mi","to_unit":"km"},"expected":{"result":8.04672,"factor":1.609344,"formula":"1 mi = 1.609344 km","result_text":"5 mi = 8.04672 km","conversion_table":{"m":8046.72,"ft":26400}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/mass":{"get":{"operationId":"convert_mass","tags":["conversion"],"summary":"Mass / Weight Converter","description":"Converts mass between metric units (μg to tonne), avoirdupois units (grain, oz, lb, stone, short and long ton) and carats using the exact definition 1 lb = 0.45359237 kg.\n\nUse when: You need body weight, ingredient weight or freight mass in another unit, e.g. pounds to kilograms, ounces to grams or stones to pounds.\nDo not use when: You need to convert weight to volume (needs a density; use density) or to force in newtons (use force).\nFormula: result = value × factor, factor = (1 from_unit in kg) / (1 to_unit in kg)\nDocs: https://tttkmbb.com/conversion/mass.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[150]},"example":150},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: ug, mg, g, kg, t, grain, oz, lb, st, ton_us, ton_uk, ct; spelled-out names and common abbreviations are accepted too. One of: ug, mg, g, kg, t, grain, oz, lb, st, ton_us, ton_uk, ct.","schema":{"description":"Unit of the input value. Accepted symbols: ug, mg, g, kg, t, grain, oz, lb, st, ton_us, ton_uk, ct; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["ug","mg","g","kg","t","grain","oz","lb","st","ton_us","ton_uk","ct"],"examples":["lb"]},"example":"lb"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: ug, mg, g, kg, t, grain, oz, lb, st, ton_us, ton_uk, ct.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["ug","mg","g","kg","t","grain","oz","lb","st","ton_us","ton_uk","ct"],"examples":["kg"]},"example":"kg"}],"x-calculator-id":"mass","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":150,"from_unit":"lb","to_unit":"kg"},"expected":{"result":68.038856,"factor":0.45359237,"formula":"1 lb = 0.45359237 kg","conversion_table":{"st":10.7143,"g":68038.9}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/temperature":{"get":{"operationId":"convert_temperature","tags":["conversion"],"summary":"Temperature Converter","description":"Converts temperatures between Celsius, Fahrenheit, Kelvin and Rankine with the exact defining relations (°F = °C × 9/5 + 32, K = °C + 273.15, °R = °F + 459.67) and rejects values below absolute zero.\n\nUse when: You need a weather, cooking, body or laboratory temperature in another scale, e.g. Fahrenheit to Celsius or Celsius to Kelvin.\nDo not use when: You need to convert a temperature difference (a change of 10 °C is 18 °F, not 50 °F: multiply by 9/5 without the offset) or heat energy (use energy).\nFormula: °F = °C × 9/5 + 32; °C = (°F − 32) × 5/9; K = °C + 273.15; °R = °F + 459.67 = K × 9/5\nDocs: https://tttkmbb.com/conversion/temperature.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[100]},"example":100},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: C, F, K, R; spelled-out names and common abbreviations are accepted too. One of: C, F, K, R.","schema":{"description":"Unit of the input value. Accepted symbols: C, F, K, R; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["C","F","K","R"],"examples":["F"]},"example":"F"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: C, F, K, R.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["C","F","K","R"],"examples":["C"]},"example":"C"}],"x-calculator-id":"temperature","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":100,"from_unit":"F","to_unit":"C"},"expected":{"result":37.777778,"formula":"°C = (°F − 32) × 5/9","result_text":"100 °F = 37.7778 °C","conversion_table":{"K":310.928,"R":559.67}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/area":{"get":{"operationId":"convert_area","tags":["conversion"],"summary":"Area Converter","description":"Converts areas between metric (mm² to km², hectare) and US/imperial units (in², ft², yd², acre, mi²) using exact factors (1 ft² = 0.09290304 m², 1 acre = 4046.8564224 m²).\n\nUse when: You need land, floor or surface area in another unit, e.g. square feet to square metres, acres to hectares or square miles to square kilometres.\nDo not use when: You need to compute an area from dimensions (use rectangle, circle or triangle-area) or material quantities for a floor (use flooring).\nFormula: result = value × factor, factor = (1 from_unit in m2) / (1 to_unit in m2)\nDocs: https://tttkmbb.com/conversion/area.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[1]},"example":1},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: mm2, cm2, m2, ha, km2, in2, ft2, yd2, acre, mi2; spelled-out names and common abbreviations are accepted too. One of: mm2, cm2, m2, ha, km2, in2, ft2, yd2, acre, mi2.","schema":{"description":"Unit of the input value. Accepted symbols: mm2, cm2, m2, ha, km2, in2, ft2, yd2, acre, mi2; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["mm2","cm2","m2","ha","km2","in2","ft2","yd2","acre","mi2"],"examples":["acre"]},"example":"acre"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: mm2, cm2, m2, ha, km2, in2, ft2, yd2, acre, mi2.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["mm2","cm2","m2","ha","km2","in2","ft2","yd2","acre","mi2"],"examples":["ft2"]},"example":"ft2"}],"x-calculator-id":"area","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":1,"from_unit":"acre","to_unit":"ft2"},"expected":{"result":43560,"factor":43560,"formula":"1 acre = 43560 ft²","conversion_table":{"m2":4046.86,"ha":0.404686}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/volume":{"get":{"operationId":"convert_volume","tags":["conversion"],"summary":"Volume Converter","description":"Converts volumes between metric units (mL, L, cm³, m³), US customary units (tsp to gallon, in³, ft³, yd³, oil barrel), imperial units (fl oz, pint, quart, gallon) and metric kitchen units, with exact definitions (1 US gal = 3.785411784 L, 1 imperial gal = 4.54609 L).\n\nUse when: You need a liquid or bulk volume in another unit, e.g. gallons to litres, cubic feet to cubic metres or millilitres to cups.\nDo not use when: You need a volume from dimensions (use cylinder, sphere or rectangular-prism), a recipe conversion with tablespoons and cups only (cooking-measurements is a focused subset), or mass from volume (use density).\nFormula: result = value × factor, factor = (1 from_unit in L) / (1 to_unit in L)\nDocs: https://tttkmbb.com/conversion/volume.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[1]},"example":1},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: mL, L, m3, cm3, tsp, tbsp, fl_oz_us, cup_us, pint_us, quart_us, gal_us, fl_oz_uk, pint_uk, quart_uk, gal_uk, in3, ft3, yd3, bbl, tsp_metric, tbsp_metric, cup_metric; spelled-out names and common abbreviations are accepted too. One of: mL, L, m3, cm3, tsp, tbsp, fl_oz_us, cup_us, pint_us, quart_us, gal_us, fl_oz_uk, pint_uk, quart_uk, gal_uk, in3, ft3, yd3, bbl, tsp_metric, tbsp_metric, cup_metric.","schema":{"description":"Unit of the input value. Accepted symbols: mL, L, m3, cm3, tsp, tbsp, fl_oz_us, cup_us, pint_us, quart_us, gal_us, fl_oz_uk, pint_uk, quart_uk, gal_uk, in3, ft3, yd3, bbl, tsp_metric, tbsp_metric, cup_metric; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["mL","L","m3","cm3","tsp","tbsp","fl_oz_us","cup_us","pint_us","quart_us","gal_us","fl_oz_uk","pint_uk","quart_uk","gal_uk","in3","ft3","yd3","bbl","tsp_metric","tbsp_metric","cup_metric"],"examples":["gal_us"]},"example":"gal_us"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: mL, L, m3, cm3, tsp, tbsp, fl_oz_us, cup_us, pint_us, quart_us, gal_us, fl_oz_uk, pint_uk, quart_uk, gal_uk, in3, ft3, yd3, bbl, tsp_metric, tbsp_metric, cup_metric.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["mL","L","m3","cm3","tsp","tbsp","fl_oz_us","cup_us","pint_us","quart_us","gal_us","fl_oz_uk","pint_uk","quart_uk","gal_uk","in3","ft3","yd3","bbl","tsp_metric","tbsp_metric","cup_metric"],"examples":["L"]},"example":"L"}],"x-calculator-id":"volume","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":1,"from_unit":"gal_us","to_unit":"L"},"expected":{"result":3.785412,"factor":3.785411784,"formula":"1 gal_us = 3.785411784 L","conversion_table":{"mL":3785.41,"fl_oz_us":128,"gal_uk":0.832674}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/speed":{"get":{"operationId":"convert_speed","tags":["conversion"],"summary":"Speed Converter","description":"Converts speeds between m/s, km/h, km/s, mph, ft/s, knots and Mach number using exact factors (1 mph = 0.44704 m/s, 1 kn = 1852/3600 m/s) and 340.294 m/s for Mach 1 at sea level.\n\nUse when: You need a vehicle, wind, running or aircraft speed in another unit, e.g. km/h to mph, knots to km/h or m/s to ft/s.\nDo not use when: You need running pace (min/km or min/mile, use pace-converter) or to derive speed from distance and time (use speed-distance-time).\nFormula: result = value × factor, factor = (1 from_unit in m/s) / (1 to_unit in m/s)\nDocs: https://tttkmbb.com/conversion/speed.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[100]},"example":100},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: m/s, km/h, km/s, mph, ft/s, kn, mach; spelled-out names and common abbreviations are accepted too. One of: m/s, km/h, km/s, mph, ft/s, kn, mach.","schema":{"description":"Unit of the input value. Accepted symbols: m/s, km/h, km/s, mph, ft/s, kn, mach; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["m/s","km/h","km/s","mph","ft/s","kn","mach"],"examples":["km/h"]},"example":"km/h"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: m/s, km/h, km/s, mph, ft/s, kn, mach.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["m/s","km/h","km/s","mph","ft/s","kn","mach"],"examples":["mph"]},"example":"mph"}],"x-calculator-id":"speed","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":100,"from_unit":"km/h","to_unit":"mph"},"expected":{"result":62.137119,"formula":"1 km/h = 0.6213711922 mph","conversion_table":{"m/s":27.7778,"kn":53.9957,"ft/s":91.1344}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/time":{"get":{"operationId":"convert_time","tags":["conversion"],"summary":"Time Converter","description":"Converts durations between nanoseconds, microseconds, milliseconds, seconds, minutes, hours, days, weeks, fortnights, 30-day months, 365-day years and Julian years (365.25 days).\n\nUse when: You need a duration in another unit, e.g. hours to minutes, days to weeks or seconds to milliseconds.\nDo not use when: You need the time between two calendar dates (use date-difference), a date shifted by a duration (use add-days), or a clock-time difference (use time-duration).\nFormula: result = value × factor, factor = (1 from_unit in s) / (1 to_unit in s)\nDocs: https://tttkmbb.com/conversion/time.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[3]},"example":3},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: ns, us, ms, s, min, h, day, week, fortnight, month_30, year_365, year_julian; spelled-out names and common abbreviations are accepted too. One of: ns, us, ms, s, min, h, day, week, fortnight, month_30, year_365, year_julian.","schema":{"description":"Unit of the input value. Accepted symbols: ns, us, ms, s, min, h, day, week, fortnight, month_30, year_365, year_julian; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["ns","us","ms","s","min","h","day","week","fortnight","month_30","year_365","year_julian"],"examples":["h"]},"example":"h"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: ns, us, ms, s, min, h, day, week, fortnight, month_30, year_365, year_julian.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["ns","us","ms","s","min","h","day","week","fortnight","month_30","year_365","year_julian"],"examples":["min"]},"example":"min"}],"x-calculator-id":"time","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":3,"from_unit":"h","to_unit":"min"},"expected":{"result":180,"factor":60,"formula":"1 h = 60 min","conversion_table":{"s":10800,"day":0.125}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/data-storage":{"get":{"operationId":"convert_data_storage","tags":["conversion"],"summary":"Data Storage Converter","description":"Converts digital storage and transfer sizes between bits, bytes, decimal SI multiples (KB = 1000 B, MB, GB, TB, PB), binary IEC multiples (KiB = 1024 B, MiB, GiB, TiB, PiB) and kilobit/megabit/gigabit/terabit.\n\nUse when: You need a file, disk or memory size in another unit, e.g. GB to GiB, MB to bits or TB to GB, or want to explain why a '1 TB' drive shows as 931 GiB.\nDo not use when: You need transfer time from size and bandwidth (use download-time) or a number in binary/hex (use base-converter).\nFormula: result = value × factor, factor = (1 from_unit in B) / (1 to_unit in B)\nDocs: https://tttkmbb.com/conversion/data-storage.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[1]},"example":1},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: bit, B, KB, MB, GB, TB, PB, KiB, MiB, GiB, TiB, PiB, kbit, Mbit, Gbit, Tbit; spelled-out names and common abbreviations are accepted too. One of: bit, B, KB, MB, GB, TB, PB, KiB, MiB, GiB, TiB, PiB, kbit, Mbit, Gbit, Tbit.","schema":{"description":"Unit of the input value. Accepted symbols: bit, B, KB, MB, GB, TB, PB, KiB, MiB, GiB, TiB, PiB, kbit, Mbit, Gbit, Tbit; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["bit","B","KB","MB","GB","TB","PB","KiB","MiB","GiB","TiB","PiB","kbit","Mbit","Gbit","Tbit"],"examples":["GB"]},"example":"GB"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: bit, B, KB, MB, GB, TB, PB, KiB, MiB, GiB, TiB, PiB, kbit, Mbit, Gbit, Tbit.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["bit","B","KB","MB","GB","TB","PB","KiB","MiB","GiB","TiB","PiB","kbit","Mbit","Gbit","Tbit"],"examples":["GiB"]},"example":"GiB"}],"x-calculator-id":"data-storage","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":1,"from_unit":"GB","to_unit":"GiB"},"expected":{"result":0.931323,"formula":"1 GB = 0.9313225746 GiB","conversion_table":{"MB":1000,"MiB":953.674,"bit":8000000000}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/energy":{"get":{"operationId":"convert_energy","tags":["conversion"],"summary":"Energy Converter","description":"Converts energy between joules (J to GJ), calories (thermochemical cal = 4.184 J, kcal), watt-hours (Wh, kWh, MWh), BTU (International Table, 1055.05585262 J), MMBTU, therm (EC), electronvolts, ergs and foot-pounds.\n\nUse when: You need an energy amount in another unit, e.g. kWh to MJ, kcal to kJ, BTU to kWh or therms to kWh for utility bills.\nDo not use when: You need power (rate of energy, use power), the cost of electricity (use electricity-cost) or calories from macronutrient grams (use calories-from-macros).\nFormula: result = value × factor, factor = (1 from_unit in J) / (1 to_unit in J)\nDocs: https://tttkmbb.com/conversion/energy.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[100]},"example":100},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: J, kJ, MJ, GJ, erg, cal, kcal, Wh, kWh, MWh, BTU, MMBTU, therm, eV, ft_lbf; spelled-out names and common abbreviations are accepted too. One of: J, kJ, MJ, GJ, erg, cal, kcal, Wh, kWh, MWh, BTU, MMBTU, therm, eV, ft_lbf.","schema":{"description":"Unit of the input value. Accepted symbols: J, kJ, MJ, GJ, erg, cal, kcal, Wh, kWh, MWh, BTU, MMBTU, therm, eV, ft_lbf; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["J","kJ","MJ","GJ","erg","cal","kcal","Wh","kWh","MWh","BTU","MMBTU","therm","eV","ft_lbf"],"examples":["kWh"]},"example":"kWh"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: J, kJ, MJ, GJ, erg, cal, kcal, Wh, kWh, MWh, BTU, MMBTU, therm, eV, ft_lbf.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["J","kJ","MJ","GJ","erg","cal","kcal","Wh","kWh","MWh","BTU","MMBTU","therm","eV","ft_lbf"],"examples":["MJ"]},"example":"MJ"}],"x-calculator-id":"energy","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":100,"from_unit":"kWh","to_unit":"MJ"},"expected":{"result":360,"factor":3.6,"formula":"1 kWh = 3.6 MJ","conversion_table":{"BTU":341214,"kcal":86042.1}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/pressure":{"get":{"operationId":"convert_pressure","tags":["conversion"],"summary":"Pressure Converter","description":"Converts pressure between pascals (Pa to MPa), bar/millibar, standard atmospheres, psi and ksi, millimetres and inches of mercury, torr and technical atmospheres (kgf/cm²) using NIST factors (1 psi = 6894.757293168 Pa, 1 atm = 101325 Pa).\n\nUse when: You need tyre, weather, hydraulic, vacuum or blood pressure in another unit, e.g. psi to bar, atm to kPa or mmHg to kPa.\nDo not use when: You need to compute pressure from force and area (a physics calculation, not a unit conversion) or the gas law relation between pressure, volume and temperature (use ideal-gas-law).\nFormula: result = value × factor, factor = (1 from_unit in Pa) / (1 to_unit in Pa)\nDocs: https://tttkmbb.com/conversion/pressure.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[1]},"example":1},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: Pa, hPa, kPa, MPa, bar, mbar, atm, psi, ksi, mmHg, torr, inHg, kgf/cm2; spelled-out names and common abbreviations are accepted too. One of: Pa, hPa, kPa, MPa, bar, mbar, atm, psi, ksi, mmHg, torr, inHg, kgf/cm2.","schema":{"description":"Unit of the input value. Accepted symbols: Pa, hPa, kPa, MPa, bar, mbar, atm, psi, ksi, mmHg, torr, inHg, kgf/cm2; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["Pa","hPa","kPa","MPa","bar","mbar","atm","psi","ksi","mmHg","torr","inHg","kgf/cm2"],"examples":["atm"]},"example":"atm"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: Pa, hPa, kPa, MPa, bar, mbar, atm, psi, ksi, mmHg, torr, inHg, kgf/cm2.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["Pa","hPa","kPa","MPa","bar","mbar","atm","psi","ksi","mmHg","torr","inHg","kgf/cm2"],"examples":["psi"]},"example":"psi"}],"x-calculator-id":"pressure","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":1,"from_unit":"atm","to_unit":"psi"},"expected":{"result":14.695949,"formula":"1 atm = 14.69594878 psi","conversion_table":{"bar":1.01325,"mmHg":760,"kPa":101.325,"torr":760}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/power":{"get":{"operationId":"convert_power","tags":["conversion"],"summary":"Power Converter","description":"Converts power between watts (W to GW), mechanical horsepower (745.69987158227 W), metric horsepower (735.49875 W), BTU per hour, foot-pounds per second, kcal/h and tons of refrigeration.\n\nUse when: You need engine, motor, heater or air-conditioner power in another unit, e.g. hp to kW, kW to BTU/h or tons of refrigeration to kW.\nDo not use when: You need energy (use energy) or to compute power from work and time or voltage and current (use work-power or electric-power).\nFormula: result = value × factor, factor = (1 from_unit in W) / (1 to_unit in W)\nDocs: https://tttkmbb.com/conversion/power.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[100]},"example":100},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: W, kW, MW, GW, hp, hp_metric, BTU/h, ft_lbf/s, kcal/h, ton_refrigeration; spelled-out names and common abbreviations are accepted too. One of: W, kW, MW, GW, hp, hp_metric, BTU/h, ft_lbf/s, kcal/h, ton_refrigeration.","schema":{"description":"Unit of the input value. Accepted symbols: W, kW, MW, GW, hp, hp_metric, BTU/h, ft_lbf/s, kcal/h, ton_refrigeration; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["W","kW","MW","GW","hp","hp_metric","BTU/h","ft_lbf/s","kcal/h","ton_refrigeration"],"examples":["hp"]},"example":"hp"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: W, kW, MW, GW, hp, hp_metric, BTU/h, ft_lbf/s, kcal/h, ton_refrigeration.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["W","kW","MW","GW","hp","hp_metric","BTU/h","ft_lbf/s","kcal/h","ton_refrigeration"],"examples":["kW"]},"example":"kW"}],"x-calculator-id":"power","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":100,"from_unit":"hp","to_unit":"kW"},"expected":{"result":74.569987,"formula":"1 hp = 0.7456998716 kW","conversion_table":{"BTU/h":254443,"hp_metric":101.387}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/angle":{"get":{"operationId":"convert_angle","tags":["conversion"],"summary":"Angle Converter","description":"Converts plane angles between degrees, radians, milliradians, gradians (gon), arcminutes, arcseconds and turns (revolutions) using π rad = 180° = 200 gon = 0.5 turn.\n\nUse when: You need an angle in another unit, e.g. degrees to radians for trigonometry, arcseconds for astronomy or turns for rotation counts.\nDo not use when: You need an angle from a slope or triangle (use slope, right-triangle or triangle-solver) or a rotational speed (use frequency for rpm and rad/s).\nFormula: result = value × factor, factor = (1 from_unit in rad) / (1 to_unit in rad)\nDocs: https://tttkmbb.com/conversion/angle.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[180]},"example":180},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: deg, rad, mrad, grad, arcmin, arcsec, turn; spelled-out names and common abbreviations are accepted too. One of: deg, rad, mrad, grad, arcmin, arcsec, turn.","schema":{"description":"Unit of the input value. Accepted symbols: deg, rad, mrad, grad, arcmin, arcsec, turn; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["deg","rad","mrad","grad","arcmin","arcsec","turn"],"examples":["deg"]},"example":"deg"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: deg, rad, mrad, grad, arcmin, arcsec, turn.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["deg","rad","mrad","grad","arcmin","arcsec","turn"],"examples":["rad"]},"example":"rad"}],"x-calculator-id":"angle","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":180,"from_unit":"deg","to_unit":"rad"},"expected":{"result":3.141593,"factor":0.0174532925,"formula":"1 ° = 0.01745329252 rad","conversion_table":{"grad":200,"turn":0.5,"arcmin":10800}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/fuel-economy":{"get":{"operationId":"convert_fuel_economy","tags":["conversion"],"summary":"Fuel Economy Converter","description":"Converts fuel consumption between litres per 100 km, kilometres per litre, miles per US gallon and miles per imperial gallon; L/100km is the base and the mpg relations are reciprocal (L/100km = 235.214583 / mpg_US).\n\nUse when: You need a car's fuel economy in another convention, e.g. mpg to L/100km, L/100km to km/L or US mpg to UK mpg.\nDo not use when: You need the fuel cost of a trip (use fuel-cost) or plain volume or distance conversions (use volume, length).\nFormula: L/100km = 100 / (km/L) = 235.214583 / mpg(US) = 282.480936 / mpg(UK); mpg(UK) = mpg(US) × 1.200950\nDocs: https://tttkmbb.com/conversion/fuel-economy.md","parameters":[{"name":"value","in":"query","required":true,"description":"Fuel economy in from_unit (must be greater than 0).","schema":{"description":"Fuel economy in from_unit (must be greater than 0).","type":"number","exclusiveMinimum":0,"examples":[30]},"example":30},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: L/100km, km/L, mpg_us, mpg_uk; spelled-out names and common abbreviations are accepted too. One of: L/100km, km/L, mpg_us, mpg_uk.","schema":{"description":"Unit of the input value. Accepted symbols: L/100km, km/L, mpg_us, mpg_uk; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["L/100km","km/L","mpg_us","mpg_uk"],"examples":["mpg_us"]},"example":"mpg_us"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: L/100km, km/L, mpg_us, mpg_uk.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["L/100km","km/L","mpg_us","mpg_uk"],"examples":["L/100km"]},"example":"L/100km"}],"x-calculator-id":"fuel-economy","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":30,"from_unit":"mpg_us","to_unit":"L/100km"},"expected":{"result":7.840486,"formula":"L/100km = 235.214583 / mpg (US)","conversion_table":{"km/L":12.7543,"mpg_uk":36.0285}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/force":{"get":{"operationId":"convert_force","tags":["conversion"],"summary":"Force Converter","description":"Converts force between newtons (N, kN), dynes, gram-force, kilogram-force (kilopond), ounce-force, pound-force and kips using exact factors (1 lbf = 4.4482216152605 N, 1 kgf = 9.80665 N).\n\nUse when: You need a load, thrust or weight-force in another unit, e.g. lbf to N, kgf to N or kN to kips for structural loads.\nDo not use when: You need to compute force from mass and acceleration (Newton's second law is a physics calculation, not a unit conversion), a spring force (use hookes-law) or plain mass units (use mass).\nFormula: result = value × factor, factor = (1 from_unit in N) / (1 to_unit in N)\nDocs: https://tttkmbb.com/conversion/force.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[100]},"example":100},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: N, kN, dyn, gf, kgf, ozf, lbf, kip; spelled-out names and common abbreviations are accepted too. One of: N, kN, dyn, gf, kgf, ozf, lbf, kip.","schema":{"description":"Unit of the input value. Accepted symbols: N, kN, dyn, gf, kgf, ozf, lbf, kip; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["N","kN","dyn","gf","kgf","ozf","lbf","kip"],"examples":["lbf"]},"example":"lbf"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: N, kN, dyn, gf, kgf, ozf, lbf, kip.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["N","kN","dyn","gf","kgf","ozf","lbf","kip"],"examples":["N"]},"example":"N"}],"x-calculator-id":"force","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":100,"from_unit":"lbf","to_unit":"N"},"expected":{"result":444.822162,"factor":4.4482216153,"formula":"1 lbf = 4.448221615 N","conversion_table":{"kgf":45.3592,"kN":0.444822}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/frequency":{"get":{"operationId":"convert_frequency","tags":["conversion"],"summary":"Frequency Converter","description":"Converts frequency and rotational speed between hertz (Hz to THz), revolutions per minute, beats per minute, radians per second (angular frequency, ω = 2πf) and degrees per second.\n\nUse when: You need a rate of rotation or oscillation in another unit, e.g. rpm to Hz, GHz to MHz, rad/s to rpm or bpm to Hz.\nDo not use when: You need wavelength from frequency (use wavelength-frequency), a pendulum's period (use pendulum) or a time interval (use time).\nFormula: result = value × factor, factor = (1 from_unit in Hz) / (1 to_unit in Hz)\nDocs: https://tttkmbb.com/conversion/frequency.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[3000]},"example":3000},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: Hz, kHz, MHz, GHz, THz, rpm, bpm, rad/s, deg/s; spelled-out names and common abbreviations are accepted too. One of: Hz, kHz, MHz, GHz, THz, rpm, bpm, rad/s, deg/s.","schema":{"description":"Unit of the input value. Accepted symbols: Hz, kHz, MHz, GHz, THz, rpm, bpm, rad/s, deg/s; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["Hz","kHz","MHz","GHz","THz","rpm","bpm","rad/s","deg/s"],"examples":["rpm"]},"example":"rpm"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: Hz, kHz, MHz, GHz, THz, rpm, bpm, rad/s, deg/s.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["Hz","kHz","MHz","GHz","THz","rpm","bpm","rad/s","deg/s"],"examples":["Hz"]},"example":"Hz"}],"x-calculator-id":"frequency","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":3000,"from_unit":"rpm","to_unit":"Hz"},"expected":{"result":50,"formula":"1 rpm = 0.01666666667 Hz","conversion_table":{"rad/s":314.159,"kHz":0.05}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/density":{"get":{"operationId":"convert_density","tags":["conversion"],"summary":"Density Converter","description":"Converts density between kg/m³, g/cm³, g/mL, kg/L, g/L, mg/L, lb/ft³, lb/in³, oz/in³ and lb per US gallon using exact mass and volume definitions (1 lb/ft³ = 16.01846337 kg/m³).\n\nUse when: You need a material or fluid density in another unit, e.g. g/cm³ to kg/m³, kg/m³ to lb/ft³ or g/mL to lb/gal.\nDo not use when: You need to compute density from mass and volume (a physics calculation, not a unit conversion) or concentration in mol/L (use molarity).\nFormula: result = value × factor, factor = (1 from_unit in kg/m3) / (1 to_unit in kg/m3)\nDocs: https://tttkmbb.com/conversion/density.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[1]},"example":1},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: kg/m3, g/cm3, g/mL, g/L, mg/L, kg/L, lb/ft3, lb/in3, oz/in3, lb/gal_us; spelled-out names and common abbreviations are accepted too. One of: kg/m3, g/cm3, g/mL, g/L, mg/L, kg/L, lb/ft3, lb/in3, oz/in3, lb/gal_us.","schema":{"description":"Unit of the input value. Accepted symbols: kg/m3, g/cm3, g/mL, g/L, mg/L, kg/L, lb/ft3, lb/in3, oz/in3, lb/gal_us; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["kg/m3","g/cm3","g/mL","g/L","mg/L","kg/L","lb/ft3","lb/in3","oz/in3","lb/gal_us"],"examples":["g/cm3"]},"example":"g/cm3"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: kg/m3, g/cm3, g/mL, g/L, mg/L, kg/L, lb/ft3, lb/in3, oz/in3, lb/gal_us.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["kg/m3","g/cm3","g/mL","g/L","mg/L","kg/L","lb/ft3","lb/in3","oz/in3","lb/gal_us"],"examples":["lb/ft3"]},"example":"lb/ft3"}],"x-calculator-id":"density","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":1,"from_unit":"g/cm3","to_unit":"lb/ft3"},"expected":{"result":62.427961,"formula":"1 g/cm³ = 62.42796058 lb/ft³","conversion_table":{"kg/m3":1000,"lb/gal_us":8.3454,"lb/in3":0.0361273}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/torque":{"get":{"operationId":"convert_torque","tags":["conversion"],"summary":"Torque Converter","description":"Converts torque (moment of force) between N·m, kN·m, N·cm, mN·m, lbf·ft, lbf·in, kgf·m, kgf·cm and ozf·in using exact force and length definitions (1 lbf·ft = 1.3558179483 N·m).\n\nUse when: You need a wrench, bolt or engine torque in another unit, e.g. lb-ft to N·m, N·m to lb-in or kgf·m to N·m.\nDo not use when: You need energy in joules or foot-pounds of work (use energy; torque and energy share dimensions but are different quantities) or the force alone (use force).\nFormula: result = value × factor, factor = (1 from_unit in Nm) / (1 to_unit in Nm)\nDocs: https://tttkmbb.com/conversion/torque.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[100]},"example":100},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: Nm, kNm, Ncm, mNm, lbf_ft, lbf_in, kgf_m, kgf_cm, ozf_in; spelled-out names and common abbreviations are accepted too. One of: Nm, kNm, Ncm, mNm, lbf_ft, lbf_in, kgf_m, kgf_cm, ozf_in.","schema":{"description":"Unit of the input value. Accepted symbols: Nm, kNm, Ncm, mNm, lbf_ft, lbf_in, kgf_m, kgf_cm, ozf_in; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["Nm","kNm","Ncm","mNm","lbf_ft","lbf_in","kgf_m","kgf_cm","ozf_in"],"examples":["lbf_ft"]},"example":"lbf_ft"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: Nm, kNm, Ncm, mNm, lbf_ft, lbf_in, kgf_m, kgf_cm, ozf_in.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["Nm","kNm","Ncm","mNm","lbf_ft","lbf_in","kgf_m","kgf_cm","ozf_in"],"examples":["Nm"]},"example":"Nm"}],"x-calculator-id":"torque","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":100,"from_unit":"lbf_ft","to_unit":"Nm"},"expected":{"result":135.581795,"factor":1.3558179483,"formula":"1 lbf·ft = 1.355817948 N·m","conversion_table":{"kgf_m":13.8255,"lbf_in":1200}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/cooking-measurements":{"get":{"operationId":"convert_cooking_measurements","tags":["conversion"],"summary":"Cooking Measurement Converter","description":"Converts kitchen volume measures between US customary teaspoons, tablespoons, fluid ounces, cups, pints, quarts and gallons, metric teaspoons (5 mL), tablespoons (15 mL) and cups (250 mL), imperial fluid ounces and pints, and millilitres/litres.\n\nUse when: You need to convert a recipe quantity between volume measures, e.g. cups to mL, tablespoons to teaspoons or fluid ounces to millilitres.\nDo not use when: You need to convert a volume to grams or ounces by weight (that needs the ingredient's density; use cooking-converter), to scale a whole recipe (use recipe-scaler), or non-kitchen volumes such as cubic metres (use volume).\nFormula: result = value × factor, factor = (1 from_unit in L) / (1 to_unit in L)\nDocs: https://tttkmbb.com/conversion/cooking-measurements.md","parameters":[{"name":"value","in":"query","required":true,"description":"Amount to convert, expressed in from_unit.","schema":{"description":"Amount to convert, expressed in from_unit.","type":"number","examples":[2]},"example":2},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input value. Accepted symbols: tsp, tbsp, fl_oz_us, cup_us, pint_us, quart_us, gal_us, mL, L, tsp_metric, tbsp_metric, cup_metric, fl_oz_uk, pint_uk; spelled-out names and common abbreviations are accepted too. One of: tsp, tbsp, fl_oz_us, cup_us, pint_us, quart_us, gal_us, mL, L, tsp_metric, tbsp_metric, cup_metric, fl_oz_uk, pint_uk.","schema":{"description":"Unit of the input value. Accepted symbols: tsp, tbsp, fl_oz_us, cup_us, pint_us, quart_us, gal_us, mL, L, tsp_metric, tbsp_metric, cup_metric, fl_oz_uk, pint_uk; spelled-out names and common abbreviations are accepted too.","type":"string","enum":["tsp","tbsp","fl_oz_us","cup_us","pint_us","quart_us","gal_us","mL","L","tsp_metric","tbsp_metric","cup_metric","fl_oz_uk","pint_uk"],"examples":["cup_us"]},"example":"cup_us"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into (same symbols as from_unit). One of: tsp, tbsp, fl_oz_us, cup_us, pint_us, quart_us, gal_us, mL, L, tsp_metric, tbsp_metric, cup_metric, fl_oz_uk, pint_uk.","schema":{"description":"Unit to convert into (same symbols as from_unit).","type":"string","enum":["tsp","tbsp","fl_oz_us","cup_us","pint_us","quart_us","gal_us","mL","L","tsp_metric","tbsp_metric","cup_metric","fl_oz_uk","pint_uk"],"examples":["mL"]},"example":"mL"}],"x-calculator-id":"cooking-measurements","x-outputs":["result","result_text","formula","factor","conversion_table"],"x-example":{"inputs":{"value":2,"from_unit":"cup_us","to_unit":"mL"},"expected":{"result":473.176473,"formula":"1 cup_us = 236.5882365 mL","conversion_table":{"tbsp":32,"fl_oz_us":16,"cup_metric":1.89271}}},"responses":{"200":{"description":"Result with values result, result_text, formula, factor, conversion_table","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/speed-distance-time":{"get":{"operationId":"solve_speed_distance_time","tags":["physics"],"summary":"Speed, Distance & Time Calculator","description":"Solves the uniform-motion relation speed = distance / time for whichever of the three quantities is omitted, and reports the speed in m/s, km/h and mph and the time as h:mm:ss.\n\nUse when: You know any two of distance, elapsed time and average speed for travel at constant (average) speed and need the third.\nDo not use when: Speed changes during the motion (use acceleration or free-fall), or you want a running pace per km or mile (use running-pace).\nFormula: speed_m_s = distance_m / time_s; distance_m = speed_m_s × time_s; time_s = distance_m / speed_m_s; speed_km_h = 3.6 × speed_m_s; speed_mph = speed_m_s / 0.44704\nDocs: https://tttkmbb.com/physics/speed-distance-time.md","parameters":[{"name":"distance_m","in":"query","required":false,"description":"Distance travelled in metres (1 km = 1000 m, 1 mile = 1609.344 m). Omit to solve for it. Unit: m.","schema":{"description":"Distance travelled in metres (1 km = 1000 m, 1 mile = 1609.344 m). Omit to solve for it. Unit: m.","type":"number","minimum":0,"examples":[100],"x-unit":"m"},"example":100},{"name":"time_s","in":"query","required":false,"description":"Elapsed time in seconds (1 h = 3600 s). Omit to solve for it. Unit: s.","schema":{"description":"Elapsed time in seconds (1 h = 3600 s). Omit to solve for it. Unit: s.","type":"number","exclusiveMinimum":0,"examples":[9.58],"x-unit":"s"},"example":9.58},{"name":"speed_m_s","in":"query","required":false,"description":"Average speed in metres per second (km/h ÷ 3.6, mph × 0.44704). Omit to solve for it. Unit: m/s.","schema":{"description":"Average speed in metres per second (km/h ÷ 3.6, mph × 0.44704). Omit to solve for it. Unit: m/s.","type":"number","minimum":0,"x-unit":"m/s"}}],"x-calculator-id":"speed-distance-time","x-outputs":["solved_for","distance_m [m]","distance_km [km]","time_s [s]","time_formatted","speed_m_s [m/s]","speed_km_h [km/h]","speed_mph [mph]"],"x-example":{"inputs":{"distance_m":100,"time_s":9.58},"expected":{"solved_for":"speed_m_s","speed_m_s":10.4384,"speed_km_h":37.5783,"speed_mph":23.3501,"distance_km":0.1}},"responses":{"200":{"description":"Result with values solved_for, distance_m, distance_km, time_s, time_formatted, speed_m_s, speed_km_h, speed_mph","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/acceleration":{"get":{"operationId":"calculate_acceleration","tags":["physics"],"summary":"Acceleration Calculator","description":"Computes average acceleration from initial velocity, final velocity and elapsed time, plus the velocity change, the distance covered assuming constant acceleration, and the acceleration expressed in g.\n\nUse when: You have start and end velocities over a known time interval and need the acceleration or deceleration, or the distance covered while changing speed uniformly (0–100 km/h times, braking).\nDo not use when: You know the net force and mass instead of velocities (use force), the motion is vertical under gravity alone (use free-fall), or you only need speed from distance and time (use speed-distance-time).\nFormula: a = (final_velocity_m_s − initial_velocity_m_s) / time_s; acceleration_g = a / 9.80665; distance_m = (initial_velocity_m_s + final_velocity_m_s) / 2 × time_s\nDocs: https://tttkmbb.com/physics/acceleration.md","parameters":[{"name":"initial_velocity_m_s","in":"query","required":false,"description":"Velocity at the start of the interval; 0 when starting from rest (km/h ÷ 3.6). Unit: m/s.","schema":{"description":"Velocity at the start of the interval; 0 when starting from rest (km/h ÷ 3.6). Unit: m/s.","type":"number","default":0,"examples":[0],"x-unit":"m/s"},"example":0},{"name":"final_velocity_m_s","in":"query","required":true,"description":"Velocity at the end of the interval; use 0 for coming to a stop. Unit: m/s.","schema":{"description":"Velocity at the end of the interval; use 0 for coming to a stop. Unit: m/s.","type":"number","examples":[27.78],"x-unit":"m/s"},"example":27.78},{"name":"time_s","in":"query","required":true,"description":"Duration of the velocity change in seconds. Unit: s.","schema":{"description":"Duration of the velocity change in seconds. Unit: s.","type":"number","exclusiveMinimum":0,"examples":[8],"x-unit":"s"},"example":8}],"x-calculator-id":"acceleration","x-outputs":["acceleration_m_s2 [m/s²]","acceleration_g [g]","velocity_change_m_s [m/s]","distance_m [m]"],"x-example":{"inputs":{"initial_velocity_m_s":0,"final_velocity_m_s":27.78,"time_s":8},"expected":{"acceleration_m_s2":3.4725,"acceleration_g":0.3541,"velocity_change_m_s":27.78,"distance_m":111.12}},"responses":{"200":{"description":"Result with values acceleration_m_s2, acceleration_g, velocity_change_m_s, distance_m","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/newtons-second-law":{"get":{"operationId":"calculate_force","tags":["physics"],"summary":"Force Calculator","description":"Computes net force from mass and acceleration with Newton's second law, reported in newtons, kilonewtons and pounds-force, together with the object's weight under standard gravity.\n\nUse when: You know a mass and its acceleration (or deceleration) and need the net force, or you need an object's weight in newtons or pounds-force from its mass.\nDo not use when: You need the gravitational pull between two bodies (use gravitational-force), a spring force (use hookes-law) or the force in circular motion (use centripetal-force).\nFormula: force_n = mass_kg × acceleration_m_s2; weight_n = mass_kg × 9.80665; force_lbf = force_n / 4.4482216152605; force_kn = force_n / 1000\nDocs: https://tttkmbb.com/physics/newtons-second-law.md","parameters":[{"name":"mass_kg","in":"query","required":true,"description":"Mass of the object in kilograms. Unit: kg.","schema":{"description":"Mass of the object in kilograms. Unit: kg.","type":"number","exclusiveMinimum":0,"examples":[1200],"x-unit":"kg"},"example":1200},{"name":"acceleration_m_s2","in":"query","required":true,"description":"Acceleration of the mass; negative for deceleration. Use 9.80665 for the force needed to hold the object against gravity. Unit: m/s².","schema":{"description":"Acceleration of the mass; negative for deceleration. Use 9.80665 for the force needed to hold the object against gravity. Unit: m/s².","type":"number","examples":[3],"x-unit":"m/s²"},"example":3}],"x-calculator-id":"newtons-second-law","x-outputs":["force_n [N]","force_kn [kN]","force_lbf [lbf]","weight_n [N]","weight_lbf [lbf]"],"x-example":{"inputs":{"mass_kg":1200,"acceleration_m_s2":3},"expected":{"force_n":3600,"force_kn":3.6,"force_lbf":809.3122,"weight_n":11767.98}},"responses":{"200":{"description":"Result with values force_n, force_kn, force_lbf, weight_n, weight_lbf","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/kinetic-energy":{"get":{"operationId":"calculate_kinetic_energy","tags":["physics"],"summary":"Kinetic Energy Calculator","description":"Computes the translational kinetic energy of a moving mass from KE = ½·m·v², reported in joules, kilojoules, kilowatt-hours and kilocalories.\n\nUse when: You need the energy of motion of an object of known mass and speed (vehicle, projectile, ball), for example to compare impact or braking energies.\nDo not use when: Rotation contributes significantly (rotational energy ½·I·ω² is not included), speeds approach the speed of light (relativistic formula needed), or you need energy from height (use potential-energy).\nFormula: KE = ½ × mass_kg × velocity_m_s²; kJ = J / 1000; kWh = J / 3,600,000; kcal = J / 4184\nDocs: https://tttkmbb.com/physics/kinetic-energy.md","parameters":[{"name":"mass_kg","in":"query","required":true,"description":"Mass of the moving object in kilograms. Unit: kg.","schema":{"description":"Mass of the moving object in kilograms. Unit: kg.","type":"number","exclusiveMinimum":0,"examples":[1200],"x-unit":"kg"},"example":1200},{"name":"velocity_m_s","in":"query","required":true,"description":"Speed in metres per second (km/h ÷ 3.6, mph × 0.44704). Limited to 10 % of the speed of light, below which the classical formula is accurate to within 1 %. Unit: m/s.","schema":{"description":"Speed in metres per second (km/h ÷ 3.6, mph × 0.44704). Limited to 10 % of the speed of light, below which the classical formula is accurate to within 1 %. Unit: m/s.","type":"number","minimum":0,"maximum":30000000,"examples":[25],"x-unit":"m/s"},"example":25}],"x-calculator-id":"kinetic-energy","x-outputs":["kinetic_energy_j [J]","kinetic_energy_kj [kJ]","kinetic_energy_kwh [kWh]","kinetic_energy_kcal [kcal]","velocity_km_h [km/h]"],"x-example":{"inputs":{"mass_kg":1200,"velocity_m_s":25},"expected":{"kinetic_energy_j":375000,"kinetic_energy_kj":375,"kinetic_energy_kwh":0.104167,"kinetic_energy_kcal":89.6272,"velocity_km_h":90}},"responses":{"200":{"description":"Result with values kinetic_energy_j, kinetic_energy_kj, kinetic_energy_kwh, kinetic_energy_kcal, velocity_km_h","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/potential-energy":{"get":{"operationId":"calculate_potential_energy","tags":["physics"],"summary":"Potential Energy Calculator","description":"Computes the gravitational potential energy of a mass raised to a height near a planet's surface with PE = m·g·h (standard gravity by default), and the speed the mass would reach if it fell that height freely.\n\nUse when: You need the energy stored by lifting a mass to a height, the minimum work to lift it, or the energy released when it falls (lifted loads, pumped hydro, dropped objects).\nDo not use when: Heights are a significant fraction of the planet's radius (g is not constant; use gravitational-force), or you need elastic energy (use hookes-law) or energy of motion (use kinetic-energy).\nFormula: PE = mass_kg × gravity_m_s2 × height_m; fall_speed_m_s = √(2 × gravity_m_s2 × height_m)\nDocs: https://tttkmbb.com/physics/potential-energy.md","parameters":[{"name":"mass_kg","in":"query","required":true,"description":"Mass of the object in kilograms. Unit: kg.","schema":{"description":"Mass of the object in kilograms. Unit: kg.","type":"number","exclusiveMinimum":0,"examples":[70],"x-unit":"kg"},"example":70},{"name":"height_m","in":"query","required":true,"description":"Height above the reference level (ground) in metres. Unit: m.","schema":{"description":"Height above the reference level (ground) in metres. Unit: m.","type":"number","minimum":0,"examples":[10],"x-unit":"m"},"example":10},{"name":"gravity_m_s2","in":"query","required":false,"description":"Local gravitational acceleration. Default is standard gravity g_n = 9.80665 m/s² (Moon ≈ 1.62, Mars ≈ 3.72, Jupiter ≈ 24.8). Unit: m/s².","schema":{"description":"Local gravitational acceleration. Default is standard gravity g_n = 9.80665 m/s² (Moon ≈ 1.62, Mars ≈ 3.72, Jupiter ≈ 24.8). Unit: m/s².","type":"number","maximum":10000,"exclusiveMinimum":0,"default":9.80665,"examples":[9.80665],"x-unit":"m/s²"},"example":9.80665}],"x-calculator-id":"potential-energy","x-outputs":["potential_energy_j [J]","potential_energy_kj [kJ]","potential_energy_kwh [kWh]","fall_speed_m_s [m/s]"],"x-example":{"inputs":{"mass_kg":70,"height_m":10},"expected":{"potential_energy_j":6864.655,"potential_energy_kj":6.864655,"potential_energy_kwh":0.001907,"fall_speed_m_s":14.0047}},"responses":{"200":{"description":"Result with values potential_energy_j, potential_energy_kj, potential_energy_kwh, fall_speed_m_s","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/work-power":{"get":{"operationId":"calculate_work_and_power","tags":["physics"],"summary":"Work & Power Calculator","description":"Computes the mechanical work done by a constant force over a displacement, allowing for the angle between force and motion, and the average power when the duration is supplied.\n\nUse when: You know a constant force, the distance it acts over (optionally the angle and the time taken) and need the work in joules or the average power in watts, kilowatts or horsepower.\nDo not use when: The force varies with position (for springs use hookes-law), you need electrical power from volts and amps (use electric-power), or you need energy of motion (use kinetic-energy).\nFormula: work_j = force_n × distance_m × cos(angle_degrees); power_w = work_j / time_s; power_hp = power_w / 745.69987\nDocs: https://tttkmbb.com/physics/work-power.md","parameters":[{"name":"force_n","in":"query","required":true,"description":"Magnitude of the constant force in newtons (weight = mass × 9.80665). Unit: N.","schema":{"description":"Magnitude of the constant force in newtons (weight = mass × 9.80665). Unit: N.","type":"number","minimum":0,"examples":[50],"x-unit":"N"},"example":50},{"name":"distance_m","in":"query","required":true,"description":"Displacement of the point of application in metres. Unit: m.","schema":{"description":"Displacement of the point of application in metres. Unit: m.","type":"number","minimum":0,"examples":[10],"x-unit":"m"},"example":10},{"name":"angle_degrees","in":"query","required":false,"description":"0° when the force acts along the motion; 90° gives zero work; more than 90° gives negative work (e.g. friction). Unit: °.","schema":{"description":"0° when the force acts along the motion; 90° gives zero work; more than 90° gives negative work (e.g. friction). Unit: °.","type":"number","minimum":0,"maximum":180,"default":0,"examples":[0],"x-unit":"°"},"example":0},{"name":"time_s","in":"query","required":false,"description":"Optional duration over which the work is done; enables the power outputs. Unit: s.","schema":{"description":"Optional duration over which the work is done; enables the power outputs. Unit: s.","type":"number","exclusiveMinimum":0,"examples":[4],"x-unit":"s"},"example":4}],"x-calculator-id":"work-power","x-outputs":["work_j [J]","work_kj [kJ]","work_kwh [kWh]","power_w [W]","power_kw [kW]","power_hp [hp]"],"x-example":{"inputs":{"force_n":50,"distance_m":10,"time_s":4},"expected":{"work_j":500,"work_kj":0.5,"power_w":125,"power_kw":0.125,"power_hp":0.1676}},"responses":{"200":{"description":"Result with values work_j, work_kj, work_kwh, power_w, power_kw, power_hp","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/momentum":{"get":{"operationId":"calculate_momentum","tags":["physics"],"summary":"Momentum Calculator","description":"Computes linear momentum from mass and velocity, the matching kinetic energy, and, when a stopping time is given, the average force needed to bring the object to rest (impulse–momentum theorem).\n\nUse when: You need an object's momentum, or the average force involved in stopping or launching it over a known time (collisions, braking, catching a ball).\nDo not use when: You need the outcome of a two-body collision (conservation of momentum between two objects is not implemented), or only the energy of motion (use kinetic-energy).\nFormula: p = mass_kg × velocity_m_s; KE = ½ × mass_kg × velocity_m_s²; average_stopping_force_n = |p| / stop_time_s (impulse F·Δt = Δp)\nDocs: https://tttkmbb.com/physics/momentum.md","parameters":[{"name":"mass_kg","in":"query","required":true,"description":"Mass of the object in kilograms. Unit: kg.","schema":{"description":"Mass of the object in kilograms. Unit: kg.","type":"number","exclusiveMinimum":0,"examples":[1200],"x-unit":"kg"},"example":1200},{"name":"velocity_m_s","in":"query","required":true,"description":"Velocity in metres per second; sign indicates direction along the line of motion. Unit: m/s.","schema":{"description":"Velocity in metres per second; sign indicates direction along the line of motion. Unit: m/s.","type":"number","examples":[25],"x-unit":"m/s"},"example":25},{"name":"stop_time_s","in":"query","required":false,"description":"Optional time over which the object is brought to rest; enables the average force output. Unit: s.","schema":{"description":"Optional time over which the object is brought to rest; enables the average force output. Unit: s.","type":"number","exclusiveMinimum":0,"examples":[3],"x-unit":"s"},"example":3}],"x-calculator-id":"momentum","x-outputs":["momentum_kg_m_s [kg·m/s]","kinetic_energy_j [J]","average_stopping_force_n [N]"],"x-example":{"inputs":{"mass_kg":1200,"velocity_m_s":25,"stop_time_s":3},"expected":{"momentum_kg_m_s":30000,"kinetic_energy_j":375000,"average_stopping_force_n":10000}},"responses":{"200":{"description":"Result with values momentum_kg_m_s, kinetic_energy_j, average_stopping_force_n","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/free-fall":{"get":{"operationId":"calculate_free_fall","tags":["physics"],"summary":"Free Fall Calculator","description":"Computes the time to fall a given height from rest, or the height fallen in a given time, together with the final (impact) velocity, using h = ½·g·t² with no air resistance.\n\nUse when: An object is dropped from rest near a planet's surface and you need how long it falls, how far, or how fast it lands (a dropped tool, a stone in a well).\nDo not use when: Air drag matters (light or fast objects, skydivers, long falls near terminal velocity), the object has an initial velocity or launch angle (use projectile-motion), or heights are comparable to the planet's radius.\nFormula: fall_time_s = √(2 × height_m / g); height_m = ½ × g × time_s²; final_velocity_m_s = g × fall_time_s = √(2 × g × height_m)\nDocs: https://tttkmbb.com/physics/free-fall.md","parameters":[{"name":"height_m","in":"query","required":false,"description":"Height fallen in metres. Give either height_m or time_s. Unit: m.","schema":{"description":"Height fallen in metres. Give either height_m or time_s. Unit: m.","type":"number","minimum":0,"examples":[20],"x-unit":"m"},"example":20},{"name":"time_s","in":"query","required":false,"description":"Fall duration in seconds. Give either height_m or time_s. Unit: s.","schema":{"description":"Fall duration in seconds. Give either height_m or time_s. Unit: s.","type":"number","minimum":0,"x-unit":"s"}},{"name":"gravity_m_s2","in":"query","required":false,"description":"Local gravitational acceleration. Default is standard gravity g_n = 9.80665 m/s² (Moon ≈ 1.62, Mars ≈ 3.72, Jupiter ≈ 24.8). Unit: m/s².","schema":{"description":"Local gravitational acceleration. Default is standard gravity g_n = 9.80665 m/s² (Moon ≈ 1.62, Mars ≈ 3.72, Jupiter ≈ 24.8). Unit: m/s².","type":"number","maximum":10000,"exclusiveMinimum":0,"default":9.80665,"examples":[9.80665],"x-unit":"m/s²"},"example":9.80665}],"x-calculator-id":"free-fall","x-outputs":["fall_time_s [s]","height_m [m]","final_velocity_m_s [m/s]","final_velocity_km_h [km/h]","average_velocity_m_s [m/s]"],"x-example":{"inputs":{"height_m":20},"expected":{"fall_time_s":2.0196,"height_m":20,"final_velocity_m_s":19.8057,"final_velocity_km_h":71.3005,"average_velocity_m_s":9.9029}},"responses":{"200":{"description":"Result with values fall_time_s, height_m, final_velocity_m_s, final_velocity_km_h, average_velocity_m_s","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/projectile-motion":{"get":{"operationId":"calculate_projectile_motion","tags":["physics"],"summary":"Projectile Motion Calculator","description":"Computes time of flight, horizontal range, maximum height and impact speed for a projectile launched at a given speed and angle from an optional initial height, ignoring air resistance (closed-form kinematics).\n\nUse when: You need where and when a thrown, kicked or fired object lands on level ground, or its peak height, from launch speed and angle (and launch height).\nDo not use when: Air drag is significant (golf balls, bullets, shuttlecocks), the landing point is higher than the launch point, or the object is simply dropped (use free-fall).\nFormula: vx = v·cos θ, vy = v·sin θ; time_of_flight = (vy + √(vy² + 2·g·h0)) / g; range = vx × time_of_flight; max_height = h0 + vy² / (2g); time_to_max_height = vy / g; impact_speed = √(v² + 2·g·h0)\nDocs: https://tttkmbb.com/physics/projectile-motion.md","parameters":[{"name":"initial_speed_m_s","in":"query","required":true,"description":"Initial speed in metres per second. Unit: m/s.","schema":{"description":"Initial speed in metres per second. Unit: m/s.","type":"number","minimum":0,"examples":[20],"x-unit":"m/s"},"example":20},{"name":"angle_degrees","in":"query","required":true,"description":"Angle above the horizontal in degrees (0 = horizontal, 90 = straight up). Unit: °.","schema":{"description":"Angle above the horizontal in degrees (0 = horizontal, 90 = straight up). Unit: °.","type":"number","minimum":0,"maximum":90,"examples":[45],"x-unit":"°"},"example":45},{"name":"initial_height_m","in":"query","required":false,"description":"Height of the launch point above the landing level, in metres. Unit: m.","schema":{"description":"Height of the launch point above the landing level, in metres. Unit: m.","type":"number","minimum":0,"default":0,"examples":[0],"x-unit":"m"},"example":0},{"name":"gravity_m_s2","in":"query","required":false,"description":"Local gravitational acceleration. Default is standard gravity g_n = 9.80665 m/s² (Moon ≈ 1.62, Mars ≈ 3.72, Jupiter ≈ 24.8). Unit: m/s².","schema":{"description":"Local gravitational acceleration. Default is standard gravity g_n = 9.80665 m/s² (Moon ≈ 1.62, Mars ≈ 3.72, Jupiter ≈ 24.8). Unit: m/s².","type":"number","maximum":10000,"exclusiveMinimum":0,"default":9.80665,"examples":[9.80665],"x-unit":"m/s²"},"example":9.80665}],"x-calculator-id":"projectile-motion","x-outputs":["time_of_flight_s [s]","range_m [m]","max_height_m [m]","time_to_max_height_s [s]","horizontal_velocity_m_s [m/s]","initial_vertical_velocity_m_s [m/s]","impact_speed_m_s [m/s]"],"x-example":{"inputs":{"initial_speed_m_s":20,"angle_degrees":45},"expected":{"time_of_flight_s":2.8842,"range_m":40.7886,"max_height_m":10.1972,"time_to_max_height_s":1.4421,"horizontal_velocity_m_s":14.1421,"impact_speed_m_s":20}},"responses":{"200":{"description":"Result with values time_of_flight_s, range_m, max_height_m, time_to_max_height_s, horizontal_velocity_m_s, initial_vertical_velocity_m_s, impact_speed_m_s","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/ohms-law":{"get":{"operationId":"solve_ohms_law","tags":["physics"],"summary":"Ohm's Law Calculator","description":"Solves Ohm's law V = I·R for whichever of voltage, current or resistance is omitted and reports the electrical power dissipated (P = V·I).\n\nUse when: You know two of voltage, current and resistance in a DC or purely resistive circuit and need the third and the power.\nDo not use when: The load is reactive (inductors or capacitors require impedance, not resistance), you want energy cost over time (use electric-power), or you need the equivalent resistance of several resistors (use resistors-series-parallel).\nFormula: V = I × R; I = V / R; R = V / I; P = V × I = I² × R = V² / R\nDocs: https://tttkmbb.com/physics/ohms-law.md","parameters":[{"name":"voltage_v","in":"query","required":false,"description":"Potential difference across the component in volts. Omit to solve for it. Unit: V.","schema":{"description":"Potential difference across the component in volts. Omit to solve for it. Unit: V.","type":"number","minimum":0,"examples":[12],"x-unit":"V"},"example":12},{"name":"current_a","in":"query","required":false,"description":"Current through the component in amperes (1 mA = 0.001 A). Omit to solve for it. Unit: A.","schema":{"description":"Current through the component in amperes (1 mA = 0.001 A). Omit to solve for it. Unit: A.","type":"number","minimum":0,"x-unit":"A"}},{"name":"resistance_ohm","in":"query","required":false,"description":"Resistance in ohms (1 kΩ = 1000 Ω). Omit to solve for it. Unit: Ω.","schema":{"description":"Resistance in ohms (1 kΩ = 1000 Ω). Omit to solve for it. Unit: Ω.","type":"number","exclusiveMinimum":0,"examples":[220],"x-unit":"Ω"},"example":220}],"x-calculator-id":"ohms-law","x-outputs":["solved_for","voltage_v [V]","current_a [A]","current_ma [mA]","resistance_ohm [Ω]","power_w [W]"],"x-example":{"inputs":{"voltage_v":12,"resistance_ohm":220},"expected":{"solved_for":"current_a","current_a":0.054545,"current_ma":54.545,"power_w":0.6545}},"responses":{"200":{"description":"Result with values solved_for, voltage_v, current_a, current_ma, resistance_ohm, power_w","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/electric-power":{"get":{"operationId":"calculate_electric_power","tags":["physics"],"summary":"Electric Power Calculator","description":"Computes electrical power from voltage and current (or the current drawn by a known power at a given voltage), the equivalent resistance, and, with hours of use and a tariff, the energy in kWh and its cost.\n\nUse when: You need the wattage or amperage of an appliance, whether it fits a circuit rating, or how much energy and money it uses over a period.\nDo not use when: The load has a power factor below 1 (motors, some electronics: P = V·I·cos φ), you only need V, I and R relations (use ohms-law), or you want a multi-appliance bill (use electricity-cost).\nFormula: power_w = voltage_v × current_a (or current_a = power_w / voltage_v); resistance_ohm = voltage_v / current_a; energy_kwh = power_w × usage_hours / 1000; energy_cost = energy_kwh × price_per_kwh\nDocs: https://tttkmbb.com/physics/electric-power.md","parameters":[{"name":"voltage_v","in":"query","required":true,"description":"Supply voltage in volts (e.g. 230 in Europe, 120 in North America, 12 for automotive). Unit: V.","schema":{"description":"Supply voltage in volts (e.g. 230 in Europe, 120 in North America, 12 for automotive). Unit: V.","type":"number","exclusiveMinimum":0,"examples":[230],"x-unit":"V"},"example":230},{"name":"current_a","in":"query","required":false,"description":"Current drawn in amperes. Give either current_a or power_w. Unit: A.","schema":{"description":"Current drawn in amperes. Give either current_a or power_w. Unit: A.","type":"number","minimum":0,"examples":[6.5],"x-unit":"A"},"example":6.5},{"name":"power_w","in":"query","required":false,"description":"Rated power in watts. Give either current_a or power_w. Unit: W.","schema":{"description":"Rated power in watts. Give either current_a or power_w. Unit: W.","type":"number","minimum":0,"x-unit":"W"}},{"name":"usage_hours","in":"query","required":false,"description":"Optional operating time; enables the energy output. Unit: h.","schema":{"description":"Optional operating time; enables the energy output. Unit: h.","type":"number","minimum":0,"examples":[2],"x-unit":"h"},"example":2},{"name":"price_per_kwh","in":"query","required":false,"description":"Optional tariff in your currency per kilowatt-hour; enables the cost output. Unit: per kWh.","schema":{"description":"Optional tariff in your currency per kilowatt-hour; enables the cost output. Unit: per kWh.","type":"number","minimum":0,"examples":[0.3],"x-unit":"per kWh"},"example":0.3}],"x-calculator-id":"electric-power","x-outputs":["power_w [W]","power_kw [kW]","current_a [A]","resistance_ohm [Ω]","energy_kwh [kWh]","energy_cost"],"x-example":{"inputs":{"voltage_v":230,"current_a":6.5,"usage_hours":2,"price_per_kwh":0.3},"expected":{"power_w":1495,"power_kw":1.495,"current_a":6.5,"resistance_ohm":35.3846,"energy_kwh":2.99,"energy_cost":0.9}},"responses":{"200":{"description":"Result with values power_w, power_kw, current_a, resistance_ohm, energy_kwh, energy_cost","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/density-mass-volume":{"get":{"operationId":"solve_density","tags":["physics"],"summary":"Density Calculator","description":"Solves ρ = m / V for whichever of density, mass or volume is omitted, and reports density in kg/m³ and g/cm³, volume in litres and cm³, and the specific gravity relative to water.\n\nUse when: You know two of mass, volume and density of an object or substance and need the third, e.g. the mass of a steel block, the volume of a litre of oil, or whether an object floats.\nDo not use when: The substance is a gas whose density depends strongly on pressure and temperature (use ideal-gas-law), or you need the volume of a shape first (use sphere, cylinder or rectangular-prism).\nFormula: density_kg_m3 = mass_kg / volume_m3; mass_kg = density_kg_m3 × volume_m3; volume_m3 = mass_kg / density_kg_m3; density_g_cm3 = density_kg_m3 / 1000; specific_gravity = density_kg_m3 / 1000\nDocs: https://tttkmbb.com/physics/density-mass-volume.md","parameters":[{"name":"mass_kg","in":"query","required":false,"description":"Mass in kilograms (1 g = 0.001 kg). Omit to solve for it. Unit: kg.","schema":{"description":"Mass in kilograms (1 g = 0.001 kg). Omit to solve for it. Unit: kg.","type":"number","minimum":0,"examples":[2],"x-unit":"kg"},"example":2},{"name":"volume_m3","in":"query","required":false,"description":"Volume in cubic metres (1 L = 0.001 m³, 1 cm³ = 1e-6 m³). Omit to solve for it. Unit: m³.","schema":{"description":"Volume in cubic metres (1 L = 0.001 m³, 1 cm³ = 1e-6 m³). Omit to solve for it. Unit: m³.","type":"number","exclusiveMinimum":0,"examples":[0.0025],"x-unit":"m³"},"example":0.0025},{"name":"density_kg_m3","in":"query","required":false,"description":"Density in kg/m³ (1 g/cm³ = 1000 kg/m³; water ≈ 1000, steel ≈ 7850, aluminium ≈ 2700). Omit to solve for it. Unit: kg/m³.","schema":{"description":"Density in kg/m³ (1 g/cm³ = 1000 kg/m³; water ≈ 1000, steel ≈ 7850, aluminium ≈ 2700). Omit to solve for it. Unit: kg/m³.","type":"number","exclusiveMinimum":0,"x-unit":"kg/m³"}}],"x-calculator-id":"density-mass-volume","x-outputs":["solved_for","density_kg_m3 [kg/m³]","density_g_cm3 [g/cm³]","mass_kg [kg]","mass_g [g]","volume_m3 [m³]","volume_l [L]","volume_cm3 [cm³]","specific_gravity","floats_in_water"],"x-example":{"inputs":{"mass_kg":2,"volume_m3":0.0025},"expected":{"solved_for":"density_kg_m3","density_kg_m3":800,"density_g_cm3":0.8,"volume_l":2.5,"specific_gravity":0.8,"floats_in_water":true}},"responses":{"200":{"description":"Result with values solved_for, density_kg_m3, density_g_cm3, mass_kg, mass_g, volume_m3, volume_l, volume_cm3, specific_gravity, floats_in_water","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/pressure-force-area":{"get":{"operationId":"calculate_pressure","tags":["physics"],"summary":"Pressure Calculator","description":"Computes pressure as force divided by the area it acts on, and reports it in pascals, kilopascals, bar, pounds per square inch and standard atmospheres.\n\nUse when: You know a force (or a weight in newtons) and the contact area and need the pressure: a load on a footing, a hydraulic piston, a heel on a floor.\nDo not use when: You need fluid pressure at depth (P = ρ·g·h is not implemented), gas pressure from temperature and amount (use ideal-gas-law), or the force from a mass first (use force).\nFormula: pressure_pa = force_n / area_m2; kPa = Pa / 1000; bar = Pa / 100000; psi = Pa / 6894.757293; atm = Pa / 101325\nDocs: https://tttkmbb.com/physics/pressure-force-area.md","parameters":[{"name":"force_n","in":"query","required":true,"description":"Force acting perpendicular to the surface, in newtons (weight = mass × 9.80665). Unit: N.","schema":{"description":"Force acting perpendicular to the surface, in newtons (weight = mass × 9.80665). Unit: N.","type":"number","minimum":0,"examples":[500],"x-unit":"N"},"example":500},{"name":"area_m2","in":"query","required":true,"description":"Contact area in square metres (1 cm² = 0.0001 m²). Unit: m².","schema":{"description":"Contact area in square metres (1 cm² = 0.0001 m²). Unit: m².","type":"number","exclusiveMinimum":0,"examples":[0.02],"x-unit":"m²"},"example":0.02}],"x-calculator-id":"pressure-force-area","x-outputs":["pressure_pa [Pa]","pressure_kpa [kPa]","pressure_bar [bar]","pressure_psi [psi]","pressure_atm [atm]"],"x-example":{"inputs":{"force_n":500,"area_m2":0.02},"expected":{"pressure_pa":25000,"pressure_kpa":25,"pressure_bar":0.25,"pressure_psi":3.6259,"pressure_atm":0.2467}},"responses":{"200":{"description":"Result with values pressure_pa, pressure_kpa, pressure_bar, pressure_psi, pressure_atm","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/wavelength-frequency":{"get":{"operationId":"convert_wavelength_frequency","tags":["physics"],"summary":"Wavelength & Frequency Calculator","description":"Converts between wavelength and frequency for a wave of known propagation speed (default: the speed of light in vacuum) and, for electromagnetic waves in vacuum, reports the photon energy E = h·f in joules and electronvolts.\n\nUse when: You know either the wavelength or the frequency of a light, radio or sound wave and need the other, or you need the photon energy of light of a given wavelength.\nDo not use when: The wave travels in a dispersive medium (glass, water) unless you supply the correct phase speed, or you need Doppler shifts or refraction.\nFormula: wavelength_m = wave_speed_m_s / frequency_hz; frequency_hz = wave_speed_m_s / wavelength_m; photon_energy_j = h × frequency_hz with h = 6.62607015e-34 J·s; photon_energy_ev = photon_energy_j / 1.602176634e-19\nDocs: https://tttkmbb.com/physics/wavelength-frequency.md","parameters":[{"name":"wavelength_m","in":"query","required":false,"description":"Wavelength in metres (1 nm = 1e-9 m, so 500 nm = 5e-7). Give either wavelength_m or frequency_hz. Unit: m.","schema":{"description":"Wavelength in metres (1 nm = 1e-9 m, so 500 nm = 5e-7). Give either wavelength_m or frequency_hz. Unit: m.","type":"number","exclusiveMinimum":0,"examples":[5e-7],"x-unit":"m"},"example":5e-7},{"name":"frequency_hz","in":"query","required":false,"description":"Frequency in hertz (1 MHz = 1e6 Hz, 1 GHz = 1e9 Hz). Give either wavelength_m or frequency_hz. Unit: Hz.","schema":{"description":"Frequency in hertz (1 MHz = 1e6 Hz, 1 GHz = 1e9 Hz). Give either wavelength_m or frequency_hz. Unit: Hz.","type":"number","exclusiveMinimum":0,"x-unit":"Hz"}},{"name":"wave_speed_m_s","in":"query","required":false,"description":"Propagation speed in the medium. Default c = 299,792,458 m/s (light in vacuum); use about 343 for sound in air at 20 °C, 1480 for sound in water. Unit: m/s.","schema":{"description":"Propagation speed in the medium. Default c = 299,792,458 m/s (light in vacuum); use about 343 for sound in air at 20 °C, 1480 for sound in water. Unit: m/s.","type":"number","maximum":299792458,"exclusiveMinimum":0,"default":299792458,"examples":[299792458],"x-unit":"m/s"},"example":299792458}],"x-calculator-id":"wavelength-frequency","x-outputs":["solved_for","wavelength_m [m]","wavelength_nm [nm]","frequency_hz [Hz]","wave_speed_m_s [m/s]","photon_energy_ev [eV]","photon_energy_j [J]"],"x-example":{"inputs":{"wavelength_m":5e-7},"expected":{"solved_for":"frequency_hz","frequency_hz":599584916000000,"wavelength_nm":500,"photon_energy_ev":2.479684,"photon_energy_j":"3.9729e-19"}},"responses":{"200":{"description":"Result with values solved_for, wavelength_m, wavelength_nm, frequency_hz, wave_speed_m_s, photon_energy_ev, photon_energy_j","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/pendulum":{"get":{"operationId":"calculate_pendulum_period","tags":["physics"],"summary":"Pendulum Period Calculator","description":"Computes the period, frequency and angular frequency of a simple pendulum from its length with the small-angle formula T = 2π√(L/g); when an amplitude is given it also returns the exact period from the arithmetic–geometric mean.\n\nUse when: You need how long a pendulum of known length takes to swing on Earth or another body, or how much a large swing angle lengthens the period.\nDo not use when: The bob's size or the rod's mass is not negligible (physical pendulum, T = 2π√(I / (m·g·d))), or the oscillator is a mass on a spring (use hookes-law).\nFormula: T = 2π × √(length_m / gravity_m_s2); f = 1 / T; ω = √(gravity_m_s2 / length_m); exact period for amplitude θ0: T_exact = T / agm(1, cos(θ0 / 2)) (arithmetic–geometric mean)\nDocs: https://tttkmbb.com/physics/pendulum.md","parameters":[{"name":"length_m","in":"query","required":true,"description":"Distance from the pivot to the centre of mass of the bob, in metres. Unit: m.","schema":{"description":"Distance from the pivot to the centre of mass of the bob, in metres. Unit: m.","type":"number","exclusiveMinimum":0,"examples":[1],"x-unit":"m"},"example":1},{"name":"gravity_m_s2","in":"query","required":false,"description":"Local gravitational acceleration. Default is standard gravity g_n = 9.80665 m/s² (Moon ≈ 1.62, Mars ≈ 3.72, Jupiter ≈ 24.8). Unit: m/s².","schema":{"description":"Local gravitational acceleration. Default is standard gravity g_n = 9.80665 m/s² (Moon ≈ 1.62, Mars ≈ 3.72, Jupiter ≈ 24.8). Unit: m/s².","type":"number","maximum":10000,"exclusiveMinimum":0,"default":9.80665,"examples":[9.80665],"x-unit":"m/s²"},"example":9.80665},{"name":"amplitude_degrees","in":"query","required":false,"description":"Optional maximum swing angle from vertical; enables the exact (large-amplitude) period. Unit: °.","schema":{"description":"Optional maximum swing angle from vertical; enables the exact (large-amplitude) period. Unit: °.","type":"number","minimum":0,"maximum":170,"examples":[30],"x-unit":"°"},"example":30}],"x-calculator-id":"pendulum","x-outputs":["period_s [s]","frequency_hz [Hz]","angular_frequency_rad_s [rad/s]","period_at_amplitude_s [s]","amplitude_correction_percent [%]"],"x-example":{"inputs":{"length_m":1,"amplitude_degrees":30},"expected":{"period_s":2.0064,"frequency_hz":0.4984,"angular_frequency_rad_s":3.1316,"period_at_amplitude_s":2.0413,"amplitude_correction_percent":1.7409}},"responses":{"200":{"description":"Result with values period_s, frequency_hz, angular_frequency_rad_s, period_at_amplitude_s, amplitude_correction_percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/hookes-law":{"get":{"operationId":"calculate_hookes_law","tags":["physics"],"summary":"Hooke's Law Calculator","description":"Computes the restoring force of a linear spring and the elastic potential energy stored at a given displacement, plus the natural period and frequency of a mass on that spring when a mass is supplied.\n\nUse when: You know a spring constant and how far the spring is stretched or compressed and need the force or stored energy, or the oscillation period of a spring–mass system.\nDo not use when: The spring is loaded beyond its elastic (linear) limit, or you need gravitational energy (use potential-energy) or a pendulum's period (use pendulum).\nFormula: force_n = spring_constant_n_m × |displacement_m|; U = ½ × spring_constant_n_m × displacement_m²; T = 2π × √(mass_kg / spring_constant_n_m); f = 1 / T\nDocs: https://tttkmbb.com/physics/hookes-law.md","parameters":[{"name":"spring_constant_n_m","in":"query","required":true,"description":"Stiffness k in newtons per metre. Unit: N/m.","schema":{"description":"Stiffness k in newtons per metre. Unit: N/m.","type":"number","exclusiveMinimum":0,"examples":[200],"x-unit":"N/m"},"example":200},{"name":"displacement_m","in":"query","required":true,"description":"Extension (positive) or compression (negative) from the natural length, in metres (1 cm = 0.01 m). Unit: m.","schema":{"description":"Extension (positive) or compression (negative) from the natural length, in metres (1 cm = 0.01 m). Unit: m.","type":"number","examples":[0.05],"x-unit":"m"},"example":0.05},{"name":"mass_kg","in":"query","required":false,"description":"Optional mass on the spring; enables the oscillation period and frequency outputs. Unit: kg.","schema":{"description":"Optional mass on the spring; enables the oscillation period and frequency outputs. Unit: kg.","type":"number","exclusiveMinimum":0,"examples":[0.5],"x-unit":"kg"},"example":0.5}],"x-calculator-id":"hookes-law","x-outputs":["force_n [N]","elastic_potential_energy_j [J]","period_s [s]","frequency_hz [Hz]"],"x-example":{"inputs":{"spring_constant_n_m":200,"displacement_m":0.05,"mass_kg":0.5},"expected":{"force_n":10,"elastic_potential_energy_j":0.25,"period_s":0.3142,"frequency_hz":3.1831}},"responses":{"200":{"description":"Result with values force_n, elastic_potential_energy_j, period_s, frequency_hz","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/gravitational-force":{"get":{"operationId":"calculate_gravitational_force","tags":["physics"],"summary":"Gravitational Force Calculator","description":"Computes the attractive gravitational force between two point or spherically symmetric masses at a given centre-to-centre distance with Newton's law and the CODATA 2018 value of G, plus the acceleration each mass experiences.\n\nUse when: You need the gravitational pull between two bodies (planet and satellite, star and planet, two laboratory masses) or the surface gravity of a body from its mass and radius.\nDo not use when: You only need weight near Earth's surface (use force with 9.80665 m/s²), or relativistic effects matter (near black holes, precision orbits).\nFormula: force_n = G × mass1_kg × mass2_kg / distance_m² with G = 6.67430e-11 m³ kg⁻¹ s⁻²; acceleration_of_mass2 = force_n / mass2_kg; acceleration_of_mass1 = force_n / mass1_kg\nDocs: https://tttkmbb.com/physics/gravitational-force.md","parameters":[{"name":"mass1_kg","in":"query","required":true,"description":"First mass in kilograms (Earth = 5.972e24, Sun = 1.989e30). Unit: kg.","schema":{"description":"First mass in kilograms (Earth = 5.972e24, Sun = 1.989e30). Unit: kg.","type":"number","exclusiveMinimum":0,"examples":[5.972e+24],"x-unit":"kg"},"example":5.972e+24},{"name":"mass2_kg","in":"query","required":true,"description":"Second mass in kilograms (Moon = 7.342e22). Unit: kg.","schema":{"description":"Second mass in kilograms (Moon = 7.342e22). Unit: kg.","type":"number","exclusiveMinimum":0,"examples":[1],"x-unit":"kg"},"example":1},{"name":"distance_m","in":"query","required":true,"description":"Centre-to-centre separation in metres (Earth's mean radius = 6.371e6, Earth–Moon = 3.844e8). Unit: m.","schema":{"description":"Centre-to-centre separation in metres (Earth's mean radius = 6.371e6, Earth–Moon = 3.844e8). Unit: m.","type":"number","exclusiveMinimum":0,"examples":[6371000],"x-unit":"m"},"example":6371000}],"x-calculator-id":"gravitational-force","x-outputs":["force_n [N]","force_micronewton [µN]","acceleration_of_mass2_m_s2 [m/s²]","acceleration_of_mass1_m_s2 [m/s²]"],"x-example":{"inputs":{"mass1_kg":5.972e+24,"mass2_kg":1,"distance_m":6371000},"expected":{"force_n":9.82,"force_micronewton":9819973,"acceleration_of_mass2_m_s2":9.82}},"responses":{"200":{"description":"Result with values force_n, force_micronewton, acceleration_of_mass2_m_s2, acceleration_of_mass1_m_s2","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/centripetal-force":{"get":{"operationId":"calculate_centripetal_force","tags":["physics"],"summary":"Centripetal Force Calculator","description":"Computes the centripetal (centre-seeking) force and acceleration needed to keep a mass moving in a circle of given radius at a given speed, plus the angular velocity, rotation period and rpm.\n\nUse when: You need the force on a car in a bend, a mass on a string, a satellite or a centrifuge sample from mass, tangential speed and radius, or the g-load of circular motion.\nDo not use when: You know the angular speed (rpm) rather than the tangential speed (compute v = ω·r first), or the motion is not circular at constant speed.\nFormula: centripetal_acceleration = velocity_m_s² / radius_m; centripetal_force_n = mass_kg × velocity_m_s² / radius_m; ω = velocity_m_s / radius_m; period_s = 2π × radius_m / velocity_m_s; rpm = 60 / period_s\nDocs: https://tttkmbb.com/physics/centripetal-force.md","parameters":[{"name":"mass_kg","in":"query","required":true,"description":"Mass of the moving object in kilograms. Unit: kg.","schema":{"description":"Mass of the moving object in kilograms. Unit: kg.","type":"number","exclusiveMinimum":0,"examples":[1200],"x-unit":"kg"},"example":1200},{"name":"velocity_m_s","in":"query","required":true,"description":"Speed along the circular path in metres per second. Unit: m/s.","schema":{"description":"Speed along the circular path in metres per second. Unit: m/s.","type":"number","exclusiveMinimum":0,"examples":[20],"x-unit":"m/s"},"example":20},{"name":"radius_m","in":"query","required":true,"description":"Radius of the circular path in metres. Unit: m.","schema":{"description":"Radius of the circular path in metres. Unit: m.","type":"number","exclusiveMinimum":0,"examples":[50],"x-unit":"m"},"example":50}],"x-calculator-id":"centripetal-force","x-outputs":["centripetal_force_n [N]","centripetal_acceleration_m_s2 [m/s²]","acceleration_g [g]","angular_velocity_rad_s [rad/s]","period_s [s]","rpm [rpm]"],"x-example":{"inputs":{"mass_kg":1200,"velocity_m_s":20,"radius_m":50},"expected":{"centripetal_force_n":9600,"centripetal_acceleration_m_s2":8,"acceleration_g":0.8158,"angular_velocity_rad_s":0.4,"period_s":15.708,"rpm":3.8197}},"responses":{"200":{"description":"Result with values centripetal_force_n, centripetal_acceleration_m_s2, acceleration_g, angular_velocity_rad_s, period_s, rpm","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/specific-heat":{"get":{"operationId":"calculate_specific_heat_energy","tags":["physics"],"summary":"Specific Heat Calculator","description":"Computes the heat energy needed to change the temperature of a mass of material by a given amount from Q = m·c·ΔT, using the specific heat capacity of liquid water (4186 J/(kg·K)) by default.\n\nUse when: You need how much energy heats or cools a known mass of water, metal or another substance by a given number of degrees, without a phase change.\nDo not use when: The substance melts, boils or freezes within the range (latent heat is not included), or you need the final temperature when two bodies are mixed (calorimetry is not implemented).\nFormula: heat_j = mass_kg × specific_heat_j_kg_k × temperature_change_k; kJ = J / 1000; kcal = J / 4184; kWh = J / 3,600,000\nDocs: https://tttkmbb.com/physics/specific-heat.md","parameters":[{"name":"mass_kg","in":"query","required":true,"description":"Mass of the substance in kilograms (1 L of water ≈ 1 kg). Unit: kg.","schema":{"description":"Mass of the substance in kilograms (1 L of water ≈ 1 kg). Unit: kg.","type":"number","exclusiveMinimum":0,"examples":[2],"x-unit":"kg"},"example":2},{"name":"specific_heat_j_kg_k","in":"query","required":false,"description":"Specific heat capacity: water 4186, ice 2090, steam 2010, aluminium 897, iron 449, copper 385, air ≈ 1005, ethanol 2440. Unit: J/(kg·K).","schema":{"description":"Specific heat capacity: water 4186, ice 2090, steam 2010, aluminium 897, iron 449, copper 385, air ≈ 1005, ethanol 2440. Unit: J/(kg·K).","type":"number","exclusiveMinimum":0,"default":4186,"examples":[4186],"x-unit":"J/(kg·K)"},"example":4186},{"name":"temperature_change_k","in":"query","required":true,"description":"Temperature rise in kelvin (identical to the °C difference); negative when the substance cools and releases heat. Unit: K.","schema":{"description":"Temperature rise in kelvin (identical to the °C difference); negative when the substance cools and releases heat. Unit: K.","type":"number","examples":[30],"x-unit":"K"},"example":30}],"x-calculator-id":"specific-heat","x-outputs":["heat_j [J]","heat_kj [kJ]","heat_kcal [kcal]","heat_kwh [kWh]"],"x-example":{"inputs":{"mass_kg":2,"temperature_change_k":30},"expected":{"heat_j":251160,"heat_kj":251.16,"heat_kcal":60.0287,"heat_kwh":0.069767}},"responses":{"200":{"description":"Result with values heat_j, heat_kj, heat_kcal, heat_kwh","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/resistors-series-parallel":{"get":{"operationId":"calculate_resistors_series_parallel","tags":["physics"],"summary":"Resistors in Series and Parallel Calculator","description":"Computes the equivalent resistance of a list of resistors connected all in series (sum) and all in parallel (reciprocal of the sum of reciprocals), plus the parallel conductance.\n\nUse when: You have two or more resistor values and need the total resistance if they are wired in series or in parallel, or want to check a parallel combination against a target value.\nDo not use when: The network mixes series and parallel branches (reduce it group by group with repeated calls), the components are capacitors or inductors, or you need voltage, current or power for one resistor (use ohms-law).\nFormula: series_total_ohm = R1 + R2 + …; 1 / parallel_total_ohm = 1/R1 + 1/R2 + …\nDocs: https://tttkmbb.com/physics/resistors-series-parallel.md","parameters":[{"name":"resistances_ohm","in":"query","required":true,"description":"Resistor values in ohms, comma-separated (1 kΩ = 1000). All values must be positive. Unit: Ω.","schema":{"description":"Resistor values in ohms, comma-separated (1 kΩ = 1000). All values must be positive. Unit: Ω. Comma-separated list in query strings.","type":"string","minItems":1,"examples":[[100,220,470]],"x-unit":"Ω"},"example":"100,220,470"}],"x-calculator-id":"resistors-series-parallel","x-outputs":["resistor_count","series_total_ohm [Ω]","parallel_total_ohm [Ω]","parallel_conductance_s [S]"],"x-example":{"inputs":{"resistances_ohm":[100,220,470]},"expected":{"resistor_count":3,"series_total_ohm":790,"parallel_total_ohm":59.9768,"parallel_conductance_s":0.016673}},"responses":{"200":{"description":"Result with values resistor_count, series_total_ohm, parallel_total_ohm, parallel_conductance_s","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/molar-mass":{"get":{"operationId":"calculate_molar_mass","tags":["chemistry"],"summary":"Molar Mass Calculator","description":"Parses a chemical formula (including brackets, nested groups and hydrates) and sums IUPAC 2021 standard atomic weights to give the molar mass in g/mol, plus the atom count and mass-percent composition of each element.\n\nUse when: You have a chemical formula and need its molar mass (molecular weight), the number of atoms of each element, or its elemental mass-percent composition.\nDo not use when: You already know the molar mass and want to convert between grams and moles (use moles-mass) or need a solution concentration (use molarity).\nFormula: molar_mass = Σ (atomic_weight_i × count_i); mass_fraction_percent_i = 100 × atomic_weight_i × count_i / molar_mass\nDocs: https://tttkmbb.com/chemistry/molar-mass.md","parameters":[{"name":"formula","in":"query","required":true,"description":"Chemical formula with case-sensitive element symbols, integer subscripts, brackets and optional hydrate dot, e.g. C6H12O6, Ca(OH)2, Fe2(SO4)3, CuSO4·5H2O. A trailing charge (NH4+, SO4^2-) or state (aq) is ignored.","schema":{"description":"Chemical formula with case-sensitive element symbols, integer subscripts, brackets and optional hydrate dot, e.g. C6H12O6, Ca(OH)2, Fe2(SO4)3, CuSO4·5H2O. A trailing charge (NH4+, SO4^2-) or state (aq) is ignored.","type":"string","examples":["C6H12O6"]},"example":"C6H12O6"}],"x-calculator-id":"molar-mass","x-outputs":["molar_mass_g_mol [g/mol]","molecular_mass_da [Da]","atom_count","element_count","composition"],"x-example":{"inputs":{"formula":"C6H12O6"},"expected":{"molar_mass_g_mol":180.156,"atom_count":24,"element_count":3,"composition":[{"element":"C","count":6,"mass_fraction_percent":40.002},{"element":"H","count":12,"mass_fraction_percent":6.714},{"element":"O","count":6,"mass_fraction_percent":53.284}]}},"responses":{"200":{"description":"Result with values molar_mass_g_mol, molecular_mass_da, atom_count, element_count, composition","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/moles-mass":{"get":{"operationId":"convert_moles_and_mass","tags":["chemistry"],"summary":"Moles to Grams Calculator","description":"Converts between mass in grams and amount in moles using the molar mass (from a formula or given directly), and reports the number of molecules or formula units from the Avogadro constant. Any two of molar mass, mass and moles give the third.\n\nUse when: You need to convert grams to moles or moles to grams for a substance, count the molecules in a sample, or back out a molar mass from a measured mass and amount.\nDo not use when: You only need the molar mass of a formula (use molar-mass), or you want a concentration in mol/L (use molarity).\nFormula: moles = mass_g / molar_mass_g_mol; mass_g = moles × molar_mass_g_mol; molecules = moles × N_A (N_A = 6.02214076×10²³ mol⁻¹)\nDocs: https://tttkmbb.com/chemistry/moles-mass.md","parameters":[{"name":"formula","in":"query","required":false,"description":"Chemical formula, e.g. NaCl, C6H12O6, Ca(OH)2 or CuSO4·5H2O (case-sensitive element symbols). Alternative to molar_mass_g_mol.","schema":{"description":"Chemical formula, e.g. NaCl, C6H12O6, Ca(OH)2 or CuSO4·5H2O (case-sensitive element symbols). Alternative to molar_mass_g_mol.","type":"string","examples":["H2O"]},"example":"H2O"},{"name":"molar_mass_g_mol","in":"query","required":false,"description":"Molar mass of the substance; use instead of formula when it is already known. Unit: g/mol.","schema":{"description":"Molar mass of the substance; use instead of formula when it is already known. Unit: g/mol.","type":"number","maximum":10000000,"exclusiveMinimum":0,"x-unit":"g/mol"}},{"name":"mass_g","in":"query","required":false,"description":"Mass of the sample in grams. Leave empty to solve for it. Unit: g.","schema":{"description":"Mass of the sample in grams. Leave empty to solve for it. Unit: g.","type":"number","exclusiveMinimum":0,"examples":[36.03],"x-unit":"g"},"example":36.03},{"name":"moles","in":"query","required":false,"description":"Amount in moles. Leave empty to solve for it. Unit: mol.","schema":{"description":"Amount in moles. Leave empty to solve for it. Unit: mol.","type":"number","exclusiveMinimum":0,"x-unit":"mol"}}],"x-calculator-id":"moles-mass","x-outputs":["molar_mass_g_mol [g/mol]","mass_g [g]","moles [mol]","millimoles [mmol]","molecules","molecules_scientific","solved_for"],"x-example":{"inputs":{"formula":"H2O","mass_g":36.03},"expected":{"molar_mass_g_mol":18.015,"moles":2,"millimoles":2000,"molecules":1.204428152e+24,"solved_for":"moles"}},"responses":{"200":{"description":"Result with values molar_mass_g_mol, mass_g, moles, millimoles, molecules, molecules_scientific, solved_for","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/molarity":{"get":{"operationId":"calculate_molarity","tags":["chemistry"],"summary":"Molarity Calculator","description":"Computes molar concentration (mol/L) of a solution from the amount of solute (moles, or mass with a formula or molar mass) and the solution volume, or the moles and mass of solute needed to prepare a target molarity.\n\nUse when: You need the molarity of a solution from what was dissolved, or the grams of solute required for a given volume and target concentration.\nDo not use when: You are diluting an existing stock solution (use dilution), or you need a mass-based concentration such as % w/w, ppm or ppb (use mass-percent).\nFormula: molarity = moles / volume_l, with moles = mass_g / molar_mass_g_mol; for a target: moles = target_molarity × volume_l and mass_g = moles × molar_mass_g_mol\nDocs: https://tttkmbb.com/chemistry/molarity.md","parameters":[{"name":"volume_l","in":"query","required":true,"description":"Total volume of the solution in litres (250 mL = 0.25). Unit: L.","schema":{"description":"Total volume of the solution in litres (250 mL = 0.25). Unit: L.","type":"number","exclusiveMinimum":0,"examples":[0.5],"x-unit":"L"},"example":0.5},{"name":"moles","in":"query","required":false,"description":"Amount of solute in moles. Takes precedence over mass_g. Unit: mol.","schema":{"description":"Amount of solute in moles. Takes precedence over mass_g. Unit: mol.","type":"number","exclusiveMinimum":0,"x-unit":"mol"}},{"name":"mass_g","in":"query","required":false,"description":"Mass of solute in grams; requires formula or molar_mass_g_mol. Unit: g.","schema":{"description":"Mass of solute in grams; requires formula or molar_mass_g_mol. Unit: g.","type":"number","exclusiveMinimum":0,"examples":[5.844],"x-unit":"g"},"example":5.844},{"name":"formula","in":"query","required":false,"description":"Chemical formula, e.g. NaCl, C6H12O6, Ca(OH)2 or CuSO4·5H2O (case-sensitive element symbols). Alternative to molar_mass_g_mol.","schema":{"description":"Chemical formula, e.g. NaCl, C6H12O6, Ca(OH)2 or CuSO4·5H2O (case-sensitive element symbols). Alternative to molar_mass_g_mol.","type":"string","examples":["NaCl"]},"example":"NaCl"},{"name":"molar_mass_g_mol","in":"query","required":false,"description":"Molar mass of the substance; use instead of formula when it is already known. Unit: g/mol.","schema":{"description":"Molar mass of the substance; use instead of formula when it is already known. Unit: g/mol.","type":"number","maximum":10000000,"exclusiveMinimum":0,"x-unit":"g/mol"}},{"name":"target_molarity_mol_per_l","in":"query","required":false,"description":"Desired concentration; when given, the calculator returns the moles and mass of solute needed for volume_l instead (moles and mass_g are ignored). Unit: mol/L.","schema":{"description":"Desired concentration; when given, the calculator returns the moles and mass of solute needed for volume_l instead (moles and mass_g are ignored). Unit: mol/L.","type":"number","exclusiveMinimum":0,"x-unit":"mol/L"}}],"x-calculator-id":"molarity","x-outputs":["molarity_mol_per_l [mol/L]","millimolar [mmol/L]","moles [mol]","mass_g [g]","molar_mass_g_mol [g/mol]","mass_concentration_g_per_l [g/L]","volume_ml [mL]","solved_for"],"x-example":{"inputs":{"volume_l":0.5,"mass_g":5.844,"formula":"NaCl"},"expected":{"molarity_mol_per_l":0.2,"millimolar":200,"moles":0.1,"molar_mass_g_mol":58.44,"mass_concentration_g_per_l":11.688,"solved_for":"molarity_mol_per_l"}},"responses":{"200":{"description":"Result with values molarity_mol_per_l, millimolar, moles, mass_g, molar_mass_g_mol, mass_concentration_g_per_l, volume_ml, solved_for","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/dilution":{"get":{"operationId":"calculate_dilution","tags":["chemistry"],"summary":"Dilution Calculator","description":"Applies the dilution equation C1·V1 = C2·V2 to find the missing one of stock concentration, stock volume, final concentration or final volume, plus the solvent to add and the dilution factor.\n\nUse when: You are diluting a stock solution and need how much stock to take, the final volume to make up, or the concentration that results.\nDo not use when: You are preparing a solution from solid solute (use molarity) or the concentrations are in mass percent with very different densities (C1V1 = C2V2 assumes volumes are additive and the unit is amount per volume).\nFormula: C1 × V1 = C2 × V2; solvent_volume_to_add = V2 − V1; dilution_factor = C1 / C2\nDocs: https://tttkmbb.com/chemistry/dilution.md","parameters":[{"name":"stock_concentration","in":"query","required":false,"description":"Concentration of the stock solution in any unit (M, mM, mg/mL, %, X); all concentrations share the unit.","schema":{"description":"Concentration of the stock solution in any unit (M, mM, mg/mL, %, X); all concentrations share the unit.","type":"number","exclusiveMinimum":0,"examples":[2]},"example":2},{"name":"stock_volume","in":"query","required":false,"description":"Volume of stock solution taken, in any unit shared with final_volume (mL, L, µL).","schema":{"description":"Volume of stock solution taken, in any unit shared with final_volume (mL, L, µL).","type":"number","exclusiveMinimum":0,"examples":[25]},"example":25},{"name":"final_concentration","in":"query","required":false,"description":"Concentration after dilution, same unit as stock_concentration.","schema":{"description":"Concentration after dilution, same unit as stock_concentration.","type":"number","exclusiveMinimum":0,"examples":[0.5]},"example":0.5},{"name":"final_volume","in":"query","required":false,"description":"Total volume after dilution, same unit as stock_volume. Leave empty to solve for it.","schema":{"description":"Total volume after dilution, same unit as stock_volume. Leave empty to solve for it.","type":"number","exclusiveMinimum":0}}],"x-calculator-id":"dilution","x-outputs":["stock_concentration","stock_volume","final_concentration","final_volume","solvent_volume_to_add","dilution_factor","solved_for"],"x-example":{"inputs":{"stock_concentration":2,"stock_volume":25,"final_concentration":0.5},"expected":{"final_volume":100,"solvent_volume_to_add":75,"dilution_factor":4,"solved_for":"final_volume"}},"responses":{"200":{"description":"Result with values stock_concentration, stock_volume, final_concentration, final_volume, solvent_volume_to_add, dilution_factor, solved_for","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/ideal-gas-law":{"get":{"operationId":"solve_ideal_gas_law","tags":["chemistry"],"summary":"Ideal Gas Law Calculator","description":"Solves the ideal gas equation PV = nRT for whichever of pressure, volume, amount or temperature is left empty, with pressure in atm, kPa, bar, mmHg or psi and temperature in °C, K or °F.\n\nUse when: You know three of pressure, volume, moles and temperature of a gas and need the fourth, or the molar volume at given conditions.\nDo not use when: The gas is near condensation or at very high pressure (use a real-gas equation such as van der Waals), or you need the mass of gas without knowing its molar mass (combine with moles-mass).\nFormula: P × V = n × R × T with R = 0.082057366 L·atm/(mol·K) (= 8.314462618 J/(mol·K)); P converted to atm, T to kelvin (K = °C + 273.15)\nDocs: https://tttkmbb.com/chemistry/ideal-gas-law.md","parameters":[{"name":"pressure","in":"query","required":false,"description":"Gas pressure in the unit given by pressure_unit. Leave empty to solve for it.","schema":{"description":"Gas pressure in the unit given by pressure_unit. Leave empty to solve for it.","type":"number","exclusiveMinimum":0,"examples":[1]},"example":1},{"name":"pressure_unit","in":"query","required":false,"description":"Unit of the pressure input (1 atm = 101.325 kPa = 1.01325 bar = 760 mmHg = 14.696 psi). One of: atm, kpa, bar, mmhg, psi.","schema":{"description":"Unit of the pressure input (1 atm = 101.325 kPa = 1.01325 bar = 760 mmHg = 14.696 psi).","type":"string","enum":["atm","kpa","bar","mmhg","psi"],"default":"atm","examples":["atm"]},"example":"atm"},{"name":"volume_l","in":"query","required":false,"description":"Gas volume in litres. Leave empty to solve for it. Unit: L.","schema":{"description":"Gas volume in litres. Leave empty to solve for it. Unit: L.","type":"number","exclusiveMinimum":0,"x-unit":"L"}},{"name":"moles","in":"query","required":false,"description":"Amount of gas in moles. Leave empty to solve for it. Unit: mol.","schema":{"description":"Amount of gas in moles. Leave empty to solve for it. Unit: mol.","type":"number","exclusiveMinimum":0,"examples":[1],"x-unit":"mol"},"example":1},{"name":"temperature","in":"query","required":false,"description":"Gas temperature in the unit given by temperature_unit (must be above absolute zero). Leave empty to solve for it.","schema":{"description":"Gas temperature in the unit given by temperature_unit (must be above absolute zero). Leave empty to solve for it.","type":"number","minimum":-459.67,"maximum":10000000,"examples":[0]},"example":0},{"name":"temperature_unit","in":"query","required":false,"description":"Unit of the temperature input; the calculation uses kelvin. One of: celsius, kelvin, fahrenheit.","schema":{"description":"Unit of the temperature input; the calculation uses kelvin.","type":"string","enum":["celsius","kelvin","fahrenheit"],"default":"celsius","examples":["celsius"]},"example":"celsius"}],"x-calculator-id":"ideal-gas-law","x-outputs":["solved_for","pressure_atm [atm]","pressure_kpa [kPa]","pressure_bar [bar]","volume_l [L]","moles [mol]","temperature_k [K]","temperature_c [°C]","molar_volume_l_per_mol [L/mol]"],"x-example":{"inputs":{"pressure":1,"pressure_unit":"atm","moles":1,"temperature":0,"temperature_unit":"celsius"},"expected":{"solved_for":"volume_l","volume_l":22.414,"molar_volume_l_per_mol":22.414,"temperature_k":273.15,"pressure_kpa":101.325}},"responses":{"200":{"description":"Result with values solved_for, pressure_atm, pressure_kpa, pressure_bar, volume_l, moles, temperature_k, temperature_c, molar_volume_l_per_mol","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/ph":{"get":{"operationId":"calculate_ph","tags":["chemistry"],"summary":"pH Calculator","description":"Converts between pH, pOH, hydrogen-ion concentration and hydroxide-ion concentration at 25 °C (Kw = 1.0×10⁻¹⁴) from any one of them, and classifies the solution as acidic, neutral or basic.\n\nUse when: You know one of pH, pOH, [H⁺] or [OH⁻] for an aqueous solution (for example the concentration of a fully dissociated strong acid or base) and need the others.\nDo not use when: The solution contains a weak acid or base or a buffer, where [H⁺] is not equal to the nominal concentration (use henderson-hasselbalch for buffers), or the temperature differs a lot from 25 °C.\nFormula: pH = −log10[H⁺]; pOH = −log10[OH⁻]; pH + pOH = pKw = 14.00 at 25 °C; [H⁺] × [OH⁻] = Kw = 1.0×10⁻¹⁴\nDocs: https://tttkmbb.com/chemistry/ph.md","parameters":[{"name":"h_concentration_mol_per_l","in":"query","required":false,"description":"Hydrogen-ion (hydronium) concentration, e.g. the molarity of a strong monoprotic acid such as HCl. Unit: mol/L.","schema":{"description":"Hydrogen-ion (hydronium) concentration, e.g. the molarity of a strong monoprotic acid such as HCl. Unit: mol/L.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[0.001],"x-unit":"mol/L"},"example":0.001},{"name":"oh_concentration_mol_per_l","in":"query","required":false,"description":"Hydroxide-ion concentration, e.g. the molarity of NaOH. Used when [H⁺] is not given. Unit: mol/L.","schema":{"description":"Hydroxide-ion concentration, e.g. the molarity of NaOH. Used when [H⁺] is not given. Unit: mol/L.","type":"number","maximum":100,"exclusiveMinimum":0,"x-unit":"mol/L"}},{"name":"ph","in":"query","required":false,"description":"Known pH; when given it takes precedence over the other inputs.","schema":{"description":"Known pH; when given it takes precedence over the other inputs.","type":"number","minimum":-2,"maximum":16}},{"name":"poh","in":"query","required":false,"description":"Known pOH; used when pH is not given.","schema":{"description":"Known pOH; used when pH is not given.","type":"number","minimum":-2,"maximum":16}}],"x-calculator-id":"ph","x-outputs":["ph","poh","h_concentration_mol_per_l [mol/L]","oh_concentration_mol_per_l [mol/L]","h_concentration_scientific","oh_concentration_scientific","classification"],"x-example":{"inputs":{"h_concentration_mol_per_l":0.001},"expected":{"ph":3,"poh":11,"oh_concentration_mol_per_l":1e-11,"h_concentration_scientific":"1.000e-3","classification":"Acidic"}},"responses":{"200":{"description":"Result with values ph, poh, h_concentration_mol_per_l, oh_concentration_mol_per_l, h_concentration_scientific, oh_concentration_scientific, classification","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/half-life":{"get":{"operationId":"calculate_half_life_decay","tags":["chemistry"],"summary":"Half-Life Calculator","description":"Computes first-order exponential decay: given two of half-life, elapsed time and remaining amount (with an initial amount) it solves the third and reports the remaining fraction, number of half-lives, decay constant and mean lifetime.\n\nUse when: You need how much of a radioactive isotope, drug or other first-order decaying quantity remains after a time, or the half-life or elapsed time implied by a measured remaining amount.\nDo not use when: The process is not first-order (e.g. zero-order elimination, growth, or compound interest – use compound-interest for money) or several isotopes decay in a chain.\nFormula: N(t) = N0 × (1/2)^(t / t½) = N0 × e^(−λt); λ = ln 2 / t½; τ = 1 / λ; t½ = t / log2(N0 / N); t = t½ × log2(N0 / N)\nDocs: https://tttkmbb.com/chemistry/half-life.md","parameters":[{"name":"initial_amount","in":"query","required":false,"description":"Starting quantity in any unit (g, Bq, atoms, mg/L). Default 100 makes remaining_amount a percentage.","schema":{"description":"Starting quantity in any unit (g, Bq, atoms, mg/L). Default 100 makes remaining_amount a percentage.","type":"number","exclusiveMinimum":0,"default":100,"examples":[100]},"example":100},{"name":"half_life","in":"query","required":false,"description":"Half-life in any time unit (same unit as elapsed_time). Leave empty to solve for it.","schema":{"description":"Half-life in any time unit (same unit as elapsed_time). Leave empty to solve for it.","type":"number","exclusiveMinimum":0,"examples":[5730]},"example":5730},{"name":"elapsed_time","in":"query","required":false,"description":"Time elapsed, same unit as half_life. Leave empty to solve for it.","schema":{"description":"Time elapsed, same unit as half_life. Leave empty to solve for it.","type":"number","minimum":0,"examples":[11460]},"example":11460},{"name":"remaining_amount","in":"query","required":false,"description":"Quantity left after elapsed_time, same unit as initial_amount. Leave empty to solve for it.","schema":{"description":"Quantity left after elapsed_time, same unit as initial_amount. Leave empty to solve for it.","type":"number","exclusiveMinimum":0}}],"x-calculator-id":"half-life","x-outputs":["remaining_amount","remaining_fraction","remaining_percent [%]","decayed_amount","number_of_half_lives","half_life","elapsed_time","decay_constant","mean_lifetime","solved_for"],"x-example":{"inputs":{"initial_amount":100,"half_life":5730,"elapsed_time":11460},"expected":{"remaining_amount":25,"remaining_fraction":0.25,"number_of_half_lives":2,"decay_constant":0.00012097,"mean_lifetime":8266.6,"solved_for":"remaining_amount"}},"responses":{"200":{"description":"Result with values remaining_amount, remaining_fraction, remaining_percent, decayed_amount, number_of_half_lives, half_life, elapsed_time, decay_constant, mean_lifetime, solved_for","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/percent-yield":{"get":{"operationId":"calculate_percent_yield","tags":["chemistry"],"summary":"Percent Yield Calculator","description":"Divides the actual (experimental) yield by the theoretical yield to give percent yield, plus the amount and percentage of product lost.\n\nUse when: You have the theoretical yield from stoichiometry and the mass or moles actually isolated, and want the reaction's percent yield.\nDo not use when: You still need the theoretical yield itself (compute moles of product from the limiting reagent with moles-mass first), or you want atom economy, which compares molar masses of reagents and product rather than isolated yield.\nFormula: percent_yield = 100 × actual_yield / theoretical_yield; product_lost = theoretical_yield − actual_yield\nDocs: https://tttkmbb.com/chemistry/percent-yield.md","parameters":[{"name":"actual_yield","in":"query","required":true,"description":"Amount of product actually obtained, in grams or moles (same unit as theoretical_yield).","schema":{"description":"Amount of product actually obtained, in grams or moles (same unit as theoretical_yield).","type":"number","minimum":0,"examples":[4.5]},"example":4.5},{"name":"theoretical_yield","in":"query","required":true,"description":"Maximum amount of product predicted by stoichiometry from the limiting reagent, same unit as actual_yield.","schema":{"description":"Maximum amount of product predicted by stoichiometry from the limiting reagent, same unit as actual_yield.","type":"number","exclusiveMinimum":0,"examples":[5]},"example":5}],"x-calculator-id":"percent-yield","x-outputs":["percent_yield [%]","yield_fraction","product_lost","percent_lost [%]"],"x-example":{"inputs":{"actual_yield":4.5,"theoretical_yield":5},"expected":{"percent_yield":90,"yield_fraction":0.9,"product_lost":0.5,"percent_lost":10}},"responses":{"200":{"description":"Result with values percent_yield, yield_fraction, product_lost, percent_lost","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/mass-percent":{"get":{"operationId":"calculate_mass_percent","tags":["chemistry"],"summary":"Mass Percent Calculator","description":"Computes the mass percent (% w/w) of a solute from the solute mass and either the total solution mass or the solvent mass, and expresses the same concentration as mass fraction, parts per million and parts per billion.\n\nUse when: You need the % w/w, ppm or ppb concentration of a solute in a solution or mixture from masses.\nDo not use when: You need molarity (mol/L, use molarity), the percent composition of an element within a compound (use molar-mass), or volume-based units such as % v/v.\nFormula: mass_percent = 100 × solute_mass / solution_mass, where solution_mass = solute_mass + solvent_mass; ppm = 10⁶ × solute_mass / solution_mass; ppb = 10⁹ × solute_mass / solution_mass\nDocs: https://tttkmbb.com/chemistry/mass-percent.md","parameters":[{"name":"solute_mass","in":"query","required":true,"description":"Mass of the solute in any unit shared by all masses (g, kg, mg).","schema":{"description":"Mass of the solute in any unit shared by all masses (g, kg, mg).","type":"number","exclusiveMinimum":0,"examples":[5]},"example":5},{"name":"solvent_mass","in":"query","required":false,"description":"Mass of the solvent; solution mass = solute + solvent. Ignored when solution_mass is given.","schema":{"description":"Mass of the solvent; solution mass = solute + solvent. Ignored when solution_mass is given.","type":"number","minimum":0,"examples":[95]},"example":95},{"name":"solution_mass","in":"query","required":false,"description":"Total mass of the solution (solute + solvent). Use this when the total, not the solvent, is known.","schema":{"description":"Total mass of the solution (solute + solvent). Use this when the total, not the solvent, is known.","type":"number","exclusiveMinimum":0}}],"x-calculator-id":"mass-percent","x-outputs":["mass_percent [% w/w]","mass_fraction","ppm [ppm]","ppb [ppb]","solution_mass","solvent_mass"],"x-example":{"inputs":{"solute_mass":5,"solvent_mass":95},"expected":{"mass_percent":5,"mass_fraction":0.05,"ppm":50000,"ppb":50000000,"solution_mass":100,"solvent_mass":95}},"responses":{"200":{"description":"Result with values mass_percent, mass_fraction, ppm, ppb, solution_mass, solvent_mass","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/henderson-hasselbalch":{"get":{"operationId":"calculate_henderson_hasselbalch_ph","tags":["chemistry"],"summary":"Henderson–Hasselbalch Calculator","description":"Computes the pH of a buffer from the acid's pKa and the concentrations (or ratio) of conjugate base and weak acid with the Henderson–Hasselbalch equation, or the base/acid ratio required for a target pH.\n\nUse when: You are preparing or analysing a buffer and need its pH from pKa and composition, or the acid-to-base ratio that gives a chosen pH.\nDo not use when: The solution is a strong acid or base (use ph), the buffer is very dilute (below about 1 mM) or the pH is more than about 1.5 units from pKa, where the approximation breaks down.\nFormula: pH = pKa + log10([A⁻] / [HA]); ratio = [A⁻]/[HA] = 10^(pH − pKa); base_percent = 100 × ratio / (1 + ratio)\nDocs: https://tttkmbb.com/chemistry/henderson-hasselbalch.md","parameters":[{"name":"pka","in":"query","required":true,"description":"Acid dissociation constant exponent of the weak acid (e.g. acetic acid 4.76, H2PO4⁻ 7.21, NH4⁺ 9.25, carbonic acid in blood 6.1).","schema":{"description":"Acid dissociation constant exponent of the weak acid (e.g. acetic acid 4.76, H2PO4⁻ 7.21, NH4⁺ 9.25, carbonic acid in blood 6.1).","type":"number","minimum":-10,"maximum":25,"examples":[4.76]},"example":4.76},{"name":"base_concentration","in":"query","required":false,"description":"Concentration of the conjugate base (e.g. acetate), in any unit shared with acid_concentration.","schema":{"description":"Concentration of the conjugate base (e.g. acetate), in any unit shared with acid_concentration.","type":"number","exclusiveMinimum":0,"examples":[0.1]},"example":0.1},{"name":"acid_concentration","in":"query","required":false,"description":"Concentration of the weak acid (e.g. acetic acid), same unit as base_concentration.","schema":{"description":"Concentration of the weak acid (e.g. acetic acid), same unit as base_concentration.","type":"number","exclusiveMinimum":0,"examples":[0.1]},"example":0.1},{"name":"ratio_base_to_acid","in":"query","required":false,"description":"Base-to-acid ratio; alternative to giving both concentrations.","schema":{"description":"Base-to-acid ratio; alternative to giving both concentrations.","type":"number","exclusiveMinimum":0}},{"name":"ph","in":"query","required":false,"description":"When given, the calculator solves for the [A⁻]/[HA] ratio that produces this pH instead of computing pH.","schema":{"description":"When given, the calculator solves for the [A⁻]/[HA] ratio that produces this pH instead of computing pH.","type":"number","minimum":-2,"maximum":16}}],"x-calculator-id":"henderson-hasselbalch","x-outputs":["ph","ratio_base_to_acid","log_ratio","base_percent [%]","acid_percent [%]","base_concentration","acid_concentration","buffer_range","solved_for"],"x-example":{"inputs":{"pka":4.76,"base_concentration":0.2,"acid_concentration":0.1},"expected":{"ph":5.061,"ratio_base_to_acid":2,"log_ratio":0.301,"base_percent":66.67,"buffer_range":"3.76 – 5.76","solved_for":"ph"}},"responses":{"200":{"description":"Result with values ph, ratio_base_to_acid, log_ratio, base_percent, acid_percent, base_concentration, acid_concentration, buffer_range, solved_for","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/age":{"get":{"operationId":"calculate_age","tags":["everyday"],"summary":"Age Calculator","description":"Computes the exact age on a given date as years, months and days by Gregorian calendar arithmetic, plus total days and weeks, the weekday of birth, and the date of and days until the next birthday.\n\nUse when: You need someone's exact age on a date, the total number of days lived, the weekday they were born on, or how many days remain until their next birthday.\nDo not use when: You need the difference between two arbitrary dates with a business-day count (use date-difference) or a countdown to an event (use days-until).\nFormula: years, months, days = calendar difference birth_date → as_of_date (when the day-of-month is smaller, days are borrowed from the month before as_of_date); total_days = as_of_date − birth_date; total_weeks = total_days / 7; age_decimal_years = total_days / 365.2425; next_birthday = first (month, day) of birth on or after as_of_date\nDocs: https://tttkmbb.com/everyday/age.md","parameters":[{"name":"birth_date","in":"query","required":true,"description":"Date of birth (ISO 8601, YYYY-MM-DD).","schema":{"description":"Date of birth (ISO 8601, YYYY-MM-DD).","type":"string","format":"date","examples":["1990-05-17"]},"example":"1990-05-17"},{"name":"as_of_date","in":"query","required":false,"description":"Date on which to evaluate the age; defaults to the current UTC date.","schema":{"description":"Date on which to evaluate the age; defaults to the current UTC date.","type":"string","format":"date","default":"today","examples":["2026-09-23"]},"example":"2026-09-23"}],"x-calculator-id":"age","x-outputs":["years","months","days","age_text","total_days [days]","total_weeks [weeks]","age_decimal_years [years]","next_birthday_date","days_until_next_birthday [days]","day_of_week_born"],"x-example":{"inputs":{"birth_date":"1990-05-17","as_of_date":"2026-09-23"},"expected":{"years":36,"months":4,"days":6,"age_text":"36 years 4 months 6 days","total_days":13278,"total_weeks":1896.9,"age_decimal_years":36.35,"next_birthday_date":"2027-05-17","days_until_next_birthday":236,"day_of_week_born":"Thursday"}},"responses":{"200":{"description":"Result with values years, months, days, age_text, total_days, total_weeks, age_decimal_years, next_birthday_date, days_until_next_birthday, day_of_week_born","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/date-difference":{"get":{"operationId":"calculate_date_difference","tags":["everyday"],"summary":"Date Difference Calculator","description":"Counts the days between two ISO dates and expresses the gap as weeks and days, as a calendar breakdown in years, months and days, and as business days (Monday–Friday, public holidays not excluded).\n\nUse when: You need the number of days, weeks or working days between two dates, or a calendar-style 'x years y months z days' difference.\nDo not use when: You want to add or subtract a number of days from a date (use add-days), or you need an age with the next birthday (use age).\nFormula: days = end_date − start_date (+1 if include_end_date); weeks = floor(days / 7); remaining_days = days mod 7; business_days = number of Mon–Fri dates in [start_date, end_date) or [start_date, end_date] when inclusive; calendar breakdown = whole years, months, then days borrowed from the month before end_date\nDocs: https://tttkmbb.com/everyday/date-difference.md","parameters":[{"name":"start_date","in":"query","required":true,"description":"First date (ISO 8601, YYYY-MM-DD).","schema":{"description":"First date (ISO 8601, YYYY-MM-DD).","type":"string","format":"date","examples":["2026-01-01"]},"example":"2026-01-01"},{"name":"end_date","in":"query","required":true,"description":"Second date (YYYY-MM-DD). If it is earlier than start_date the dates are swapped and a note is returned.","schema":{"description":"Second date (YYYY-MM-DD). If it is earlier than start_date the dates are swapped and a note is returned.","type":"string","format":"date","examples":["2026-12-25"]},"example":"2026-12-25"},{"name":"include_end_date","in":"query","required":false,"description":"true counts both endpoints (adds one day to days, weeks/days and business_days), e.g. for inclusive rental or leave periods.","schema":{"description":"true counts both endpoints (adds one day to days, weeks/days and business_days), e.g. for inclusive rental or leave periods.","type":"boolean","default":false,"examples":[false]},"example":false}],"x-calculator-id":"date-difference","x-outputs":["days [days]","weeks [weeks]","remaining_days [days]","weeks_and_days","calendar_years","calendar_months","calendar_days","calendar_text","business_days [days]"],"x-example":{"inputs":{"start_date":"2026-01-01","end_date":"2026-12-25"},"expected":{"days":358,"weeks":51,"remaining_days":1,"weeks_and_days":"51 weeks 1 day","calendar_years":0,"calendar_months":11,"calendar_days":24,"calendar_text":"11 months 24 days","business_days":256}},"responses":{"200":{"description":"Result with values days, weeks, remaining_days, weeks_and_days, calendar_years, calendar_months, calendar_days, calendar_text, business_days","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/add-days":{"get":{"operationId":"calculate_date_plus_days","tags":["everyday"],"summary":"Add or Subtract Days Calculator","description":"Adds a signed number of days to an ISO date and returns the resulting date and its weekday, using Gregorian calendar arithmetic in UTC.\n\nUse when: You need the date that is N days after (or before) a given date, e.g. a deadline 90 days from today or a return date 14 days after departure.\nDo not use when: You need the number of days between two known dates (use date-difference) or want to skip weekends when counting (not supported here).\nFormula: result_date = start_date + days (calendar days, no weekend skipping); weekday = day of week of result_date\nDocs: https://tttkmbb.com/everyday/add-days.md","parameters":[{"name":"start_date","in":"query","required":false,"description":"Date to start from (YYYY-MM-DD); defaults to the current UTC date.","schema":{"description":"Date to start from (YYYY-MM-DD); defaults to the current UTC date.","type":"string","format":"date","default":"today","examples":["2026-09-23"]},"example":"2026-09-23"},{"name":"days","in":"query","required":true,"description":"Number of days to add; negative values subtract. Unit: days.","schema":{"description":"Number of days to add; negative values subtract. Unit: days.","type":"integer","minimum":-1000000,"maximum":1000000,"examples":[90],"x-unit":"days"},"example":90}],"x-calculator-id":"add-days","x-outputs":["result_date","weekday","offset_text"],"x-example":{"inputs":{"start_date":"2026-09-23","days":90},"expected":{"result_date":"2026-12-22","weekday":"Tuesday","offset_text":"90 days (12 weeks 6 days) after 2026-09-23"}},"responses":{"200":{"description":"Result with values result_date, weekday, offset_text","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/days-until":{"get":{"operationId":"calculate_days_until","tags":["everyday"],"summary":"Days Until Calculator","description":"Counts the days from a reference date (default today) to a target date and reports the countdown as weeks and days, approximate months, a calendar breakdown and the target's weekday.\n\nUse when: You need a countdown to an event, deadline or holiday, or how many days ago a date was.\nDo not use when: You need business days or an inclusive count between two dates (use date-difference), or an age (use age).\nFormula: days = target_date − from_date; weeks = floor(|days| / 7); remaining_days = |days| mod 7; months_approx = |days| / 30.4375\nDocs: https://tttkmbb.com/everyday/days-until.md","parameters":[{"name":"target_date","in":"query","required":true,"description":"The event date (YYYY-MM-DD).","schema":{"description":"The event date (YYYY-MM-DD).","type":"string","format":"date","examples":["2026-12-25"]},"example":"2026-12-25"},{"name":"from_date","in":"query","required":false,"description":"Reference date; defaults to the current UTC date.","schema":{"description":"Reference date; defaults to the current UTC date.","type":"string","format":"date","default":"today","examples":["2026-09-23"]},"example":"2026-09-23"}],"x-calculator-id":"days-until","x-outputs":["days [days]","weeks [weeks]","remaining_days [days]","months_approx [months]","calendar_text","target_weekday","is_past","countdown_text"],"x-example":{"inputs":{"target_date":"2026-12-25","from_date":"2026-09-23"},"expected":{"days":93,"weeks":13,"remaining_days":2,"months_approx":3.1,"calendar_text":"3 months 2 days","target_weekday":"Friday","is_past":false,"countdown_text":"93 days (13 weeks 2 days) until 2026-12-25"}},"responses":{"200":{"description":"Result with values days, weeks, remaining_days, months_approx, calendar_text, target_weekday, is_past, countdown_text","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/day-of-week":{"get":{"operationId":"calculate_day_of_week","tags":["everyday"],"summary":"Day of the Week Calculator","description":"Returns the weekday of any Gregorian date together with its day-of-year number, the ISO 8601 week number and week-based year, and whether it falls on a weekend.\n\nUse when: You need to know what weekday a date falls on, its ISO week number, or its ordinal day in the year.\nDo not use when: You need to count days between dates (use date-difference) or determine leap years (use leap-year).\nFormula: day_of_year = date − 1 January + 1; ISO week: take the Thursday of the same Monday-based week, iso_week = floor((day_of_year(Thursday) − 1) / 7) + 1 and iso_week_year = year of that Thursday\nDocs: https://tttkmbb.com/everyday/day-of-week.md","parameters":[{"name":"date","in":"query","required":false,"description":"Any date in the proleptic Gregorian calendar (YYYY-MM-DD); defaults to the current UTC date.","schema":{"description":"Any date in the proleptic Gregorian calendar (YYYY-MM-DD); defaults to the current UTC date.","type":"string","format":"date","default":"today","examples":["2026-09-23"]},"example":"2026-09-23"}],"x-calculator-id":"day-of-week","x-outputs":["weekday","day_of_year","days_remaining_in_year [days]","iso_week","iso_week_year","iso_week_date","is_weekend","days_in_year"],"x-example":{"inputs":{"date":"2026-09-23"},"expected":{"weekday":"Wednesday","day_of_year":266,"days_remaining_in_year":99,"iso_week":39,"iso_week_year":2026,"iso_week_date":"2026-W39-3","is_weekend":false,"days_in_year":365}},"responses":{"200":{"description":"Result with values weekday, day_of_year, days_remaining_in_year, iso_week, iso_week_year, iso_week_date, is_weekend, days_in_year","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/time-duration":{"get":{"operationId":"calculate_time_duration","tags":["everyday"],"summary":"Time Duration Calculator","description":"Computes the elapsed time between a start and an end clock time (24-hour HH:MM), optionally minus a break, handling intervals that cross midnight, and reports it as hours and minutes and as decimal hours.\n\nUse when: You need the length of a shift, meeting, trip or any interval given two clock times on the same or consecutive days.\nDo not use when: The interval spans more than 24 hours or several days (use date-difference), or you need weekly hours and pay (use work-hours).\nFormula: gross_minutes = end − start (+ 1440 if end < start); total_minutes = gross_minutes − break_minutes; decimal_hours = total_minutes / 60\nDocs: https://tttkmbb.com/everyday/time-duration.md","parameters":[{"name":"start_time","in":"query","required":true,"description":"Start clock time in 24-hour HH:MM format.","schema":{"description":"Start clock time in 24-hour HH:MM format.","type":"string","examples":["09:30"]},"example":"09:30"},{"name":"end_time","in":"query","required":true,"description":"End clock time in 24-hour HH:MM format. An end time earlier than the start time is taken as the next day.","schema":{"description":"End clock time in 24-hour HH:MM format. An end time earlier than the start time is taken as the next day.","type":"string","examples":["17:45"]},"example":"17:45"},{"name":"break_minutes","in":"query","required":false,"description":"Unpaid or excluded minutes to subtract from the interval. Unit: min.","schema":{"description":"Unpaid or excluded minutes to subtract from the interval. Unit: min.","type":"integer","minimum":0,"maximum":1440,"default":0,"examples":[30],"x-unit":"min"},"example":30}],"x-calculator-id":"time-duration","x-outputs":["total_minutes [min]","hours [h]","minutes [min]","decimal_hours [h]","duration_text","gross_minutes [min]","crosses_midnight"],"x-example":{"inputs":{"start_time":"09:30","end_time":"17:45","break_minutes":30},"expected":{"total_minutes":465,"hours":7,"minutes":45,"decimal_hours":7.75,"duration_text":"7 h 45 min","gross_minutes":495,"crosses_midnight":false}},"responses":{"200":{"description":"Result with values total_minutes, hours, minutes, decimal_hours, duration_text, gross_minutes, crosses_midnight","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/fuel-cost":{"get":{"operationId":"calculate_fuel_cost","tags":["everyday"],"summary":"Fuel Cost Calculator","description":"Estimates the fuel needed for a trip and its cost from distance, fuel consumption in litres per 100 km and the price per litre, with the cost per person when it is shared.\n\nUse when: You want to budget a road trip or commute, or split fuel money between passengers, and know the car's consumption in L/100 km.\nDo not use when: Your consumption is in mpg or km/L (convert it first with fuel-economy), or you need total ownership costs such as tolls, wear or depreciation.\nFormula: fuel_liters = distance_km × fuel_consumption_l_per_100km / 100; total_cost = fuel_liters × fuel_price_per_liter; cost_per_person = total_cost / passengers; cost_per_km = total_cost / distance_km; mpg_us = 235.215 / L_per_100km\nDocs: https://tttkmbb.com/everyday/fuel-cost.md","parameters":[{"name":"distance_km","in":"query","required":true,"description":"Trip distance in kilometres (enter the round-trip distance for a return journey). Unit: km.","schema":{"description":"Trip distance in kilometres (enter the round-trip distance for a return journey). Unit: km.","type":"number","maximum":100000,"exclusiveMinimum":0,"examples":[350],"x-unit":"km"},"example":350},{"name":"fuel_consumption_l_per_100km","in":"query","required":true,"description":"Average consumption in litres per 100 km. Unit: L/100 km.","schema":{"description":"Average consumption in litres per 100 km. Unit: L/100 km.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[7.5],"x-unit":"L/100 km"},"example":7.5},{"name":"fuel_price_per_liter","in":"query","required":true,"description":"Price per litre in your currency. Unit: per L.","schema":{"description":"Price per litre in your currency. Unit: per L.","type":"number","minimum":0,"maximum":100,"examples":[1.85],"x-unit":"per L"},"example":1.85},{"name":"passengers","in":"query","required":false,"description":"Number of people sharing the fuel cost, driver included.","schema":{"description":"Number of people sharing the fuel cost, driver included.","type":"integer","minimum":1,"maximum":100,"default":1,"examples":[2]},"example":2}],"x-calculator-id":"fuel-cost","x-outputs":["fuel_liters [L]","total_cost","cost_per_person","cost_per_km [per km]","equivalent_mpg_us [mpg (US)]"],"x-example":{"inputs":{"distance_km":350,"fuel_consumption_l_per_100km":7.5,"fuel_price_per_liter":1.85,"passengers":2},"expected":{"fuel_liters":26.25,"total_cost":48.56,"cost_per_person":24.28,"cost_per_km":0.139,"equivalent_mpg_us":31.4}},"responses":{"200":{"description":"Result with values fuel_liters, total_cost, cost_per_person, cost_per_km, equivalent_mpg_us","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/electricity-cost":{"get":{"operationId":"calculate_electricity_cost","tags":["everyday"],"summary":"Electricity Cost Calculator","description":"Converts an appliance's power draw and daily usage into kilowatt-hours and the running cost per day, over a chosen number of days, per 30-day month and per 365-day year, using the US DOE energy-use formula.\n\nUse when: You want to know what a heater, fridge, computer, light or EV charger costs to run, or compare two appliances by energy cost.\nDo not use when: The appliance cycles or has standby modes with unknown duty cycle (use a measured kWh figure or plug-in meter), or you need to convert energy units (use energy).\nFormula: kWh/day = power_watts × hours_per_day / 1000; cost/day = kWh/day × price_per_kwh; period = × days; month = × 30; year = × 365\nDocs: https://tttkmbb.com/everyday/electricity-cost.md","parameters":[{"name":"power_watts","in":"query","required":true,"description":"Power draw in watts while running (1 kW = 1000 W). Unit: W.","schema":{"description":"Power draw in watts while running (1 kW = 1000 W). Unit: W.","type":"number","maximum":1000000,"exclusiveMinimum":0,"examples":[100],"x-unit":"W"},"example":100},{"name":"hours_per_day","in":"query","required":true,"description":"Hours the appliance actually draws that power each day. Unit: h/day.","schema":{"description":"Hours the appliance actually draws that power each day. Unit: h/day.","type":"number","minimum":0,"maximum":24,"examples":[5],"x-unit":"h/day"},"example":5},{"name":"price_per_kwh","in":"query","required":true,"description":"Tariff per kilowatt-hour in your currency (from your bill). Unit: per kWh.","schema":{"description":"Tariff per kilowatt-hour in your currency (from your bill). Unit: per kWh.","type":"number","minimum":0,"maximum":100,"examples":[0.15],"x-unit":"per kWh"},"example":0.15},{"name":"days","in":"query","required":false,"description":"Length of the billing period to report. Unit: days.","schema":{"description":"Length of the billing period to report. Unit: days.","type":"integer","minimum":1,"maximum":3660,"default":30,"examples":[30],"x-unit":"days"},"example":30}],"x-calculator-id":"electricity-cost","x-outputs":["kwh_per_day [kWh/day]","cost_per_day","kwh_for_period [kWh]","cost_for_period","cost_per_month","cost_per_year"],"x-example":{"inputs":{"power_watts":100,"hours_per_day":5,"price_per_kwh":0.15,"days":30},"expected":{"kwh_per_day":0.5,"cost_per_day":0.075,"kwh_for_period":15,"cost_for_period":2.25,"cost_per_month":2.25,"cost_per_year":27.38}},"responses":{"200":{"description":"Result with values kwh_per_day, cost_per_day, kwh_for_period, cost_for_period, cost_per_month, cost_per_year","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/bill-split":{"get":{"operationId":"calculate_bill_split","tags":["everyday"],"summary":"Bill Split Calculator","description":"Adds an optional tip percentage to a bill and divides the total equally among a number of people, reporting the tip, the total and each person's share.\n\nUse when: A restaurant bill, taxi fare or shared purchase must be divided equally among several people, with or without a tip.\nDo not use when: Shares are unequal (itemised bills), you only need the tip amount for one payer (use tip), or the cost is a trip's fuel (use fuel-cost).\nFormula: tip_amount = total_bill × tip_percent / 100; total_with_tip = total_bill + tip_amount; per_person = total_with_tip / people\nDocs: https://tttkmbb.com/everyday/bill-split.md","parameters":[{"name":"total_bill","in":"query","required":true,"description":"Bill total before tip, in your currency.","schema":{"description":"Bill total before tip, in your currency.","type":"number","minimum":0,"maximum":100000000,"examples":[120]},"example":120},{"name":"people","in":"query","required":true,"description":"How many people share the bill equally.","schema":{"description":"How many people share the bill equally.","type":"integer","minimum":1,"maximum":1000,"examples":[4]},"example":4},{"name":"tip_percent","in":"query","required":false,"description":"Tip as a percentage of the bill (15 means 15 %). Unit: %.","schema":{"description":"Tip as a percentage of the bill (15 means 15 %). Unit: %.","type":"number","minimum":0,"maximum":100,"default":0,"examples":[15],"x-unit":"%"},"example":15}],"x-calculator-id":"bill-split","x-outputs":["tip_amount","total_with_tip","per_person","bill_per_person","tip_per_person"],"x-example":{"inputs":{"total_bill":120,"people":4,"tip_percent":15},"expected":{"tip_amount":18,"total_with_tip":138,"per_person":34.5,"bill_per_person":30,"tip_per_person":4.5}},"responses":{"200":{"description":"Result with values tip_amount, total_with_tip, per_person, bill_per_person, tip_per_person","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/unit-price":{"get":{"operationId":"calculate_unit_price","tags":["everyday"],"summary":"Unit Price Comparison Calculator","description":"Divides each price by its quantity to get the price per unit, tells which of two options is cheaper per unit and by what percentage.\n\nUse when: You are comparing two package sizes or brands of the same product (e.g. 500 g for 3.49 vs 1 kg for 5.99) and want the better value per unit.\nDo not use when: The two quantities are in different units (convert them to the same unit first, e.g. with mass or volume), or you need a discount on a single price (use discount).\nFormula: unit_price = price / quantity; savings_percent = (max(unit_price_a, unit_price_b) − min(unit_price_a, unit_price_b)) / max(unit_price_a, unit_price_b) × 100\nDocs: https://tttkmbb.com/everyday/unit-price.md","parameters":[{"name":"price_a","in":"query","required":true,"description":"Total price of option A.","schema":{"description":"Total price of option A.","type":"number","minimum":0,"maximum":100000000,"examples":[3.49]},"example":3.49},{"name":"quantity_a","in":"query","required":true,"description":"Quantity in option A (grams, kilograms, litres, pieces …).","schema":{"description":"Quantity in option A (grams, kilograms, litres, pieces …).","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[0.5]},"example":0.5},{"name":"price_b","in":"query","required":true,"description":"Total price of option B.","schema":{"description":"Total price of option B.","type":"number","minimum":0,"maximum":100000000,"examples":[5.99]},"example":5.99},{"name":"quantity_b","in":"query","required":true,"description":"Quantity in option B, in the same unit as quantity_a.","schema":{"description":"Quantity in option B, in the same unit as quantity_a.","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[1]},"example":1}],"x-calculator-id":"unit-price","x-outputs":["unit_price_a","unit_price_b","cheaper_option","savings_percent [%]","unit_price_difference"],"x-example":{"inputs":{"price_a":3.49,"quantity_a":0.5,"price_b":5.99,"quantity_b":1},"expected":{"unit_price_a":6.98,"unit_price_b":5.99,"cheaper_option":"Option B","savings_percent":14.18,"unit_price_difference":0.99}},"responses":{"200":{"description":"Result with values unit_price_a, unit_price_b, cheaper_option, savings_percent, unit_price_difference","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/reading-time":{"get":{"operationId":"estimate_reading_time","tags":["everyday"],"summary":"Reading Time Calculator","description":"Estimates how long a text takes to read silently from its word count and a reading speed, defaulting to 238 words per minute, the adult mean for non-fiction found in Brysbaert's 2019 meta-analysis; also gives the read-aloud time at 183 wpm.\n\nUse when: You need an estimated reading time for an article, book, speech or document, or want to convert a word count into minutes.\nDo not use when: You need typing speed (use typing-speed) or the text is in a language or script with very different reading rates (adjust words_per_minute).\nFormula: minutes = word_count / words_per_minute; read_aloud_minutes = word_count / 183\nDocs: https://tttkmbb.com/everyday/reading-time.md","parameters":[{"name":"word_count","in":"query","required":true,"description":"Number of words in the text. Unit: words.","schema":{"description":"Number of words in the text. Unit: words.","type":"integer","minimum":1,"maximum":100000000,"examples":[1500],"x-unit":"words"},"example":1500},{"name":"words_per_minute","in":"query","required":false,"description":"Silent reading speed. Adult means: 238 wpm non-fiction, 260 wpm fiction (Brysbaert 2019). Unit: wpm.","schema":{"description":"Silent reading speed. Adult means: 238 wpm non-fiction, 260 wpm fiction (Brysbaert 2019). Unit: wpm.","type":"number","minimum":50,"maximum":2000,"default":238,"examples":[238],"x-unit":"wpm"},"example":238}],"x-calculator-id":"reading-time","x-outputs":["minutes [min]","seconds [s]","reading_time","read_aloud_minutes [min]"],"x-example":{"inputs":{"word_count":1500},"expected":{"minutes":6.3,"seconds":378,"reading_time":"6 min 18 s","read_aloud_minutes":8.2}},"responses":{"200":{"description":"Result with values minutes, seconds, reading_time, read_aloud_minutes","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/typing-speed":{"get":{"operationId":"calculate_typing_speed","tags":["everyday"],"summary":"Typing Speed Calculator","description":"Computes gross words per minute from characters typed (one word = 5 characters) or from a word count, then net WPM after penalising uncorrected errors, plus accuracy and characters per minute.\n\nUse when: You timed a typing test and know the characters or words typed, the time and the number of errors, and want standard WPM figures.\nDo not use when: You need reading speed (use reading-time) or the test software already reports WPM under its own error rules.\nFormula: words = characters / 5; gross_wpm = words / minutes; net_wpm = gross_wpm − errors / minutes; accuracy = (characters − errors) / characters × 100; cpm = characters / minutes\nDocs: https://tttkmbb.com/everyday/typing-speed.md","parameters":[{"name":"characters_typed","in":"query","required":false,"description":"Total characters typed including spaces and punctuation. Takes precedence over words_typed when both are given.","schema":{"description":"Total characters typed including spaces and punctuation. Takes precedence over words_typed when both are given.","type":"integer","minimum":1,"maximum":10000000,"examples":[1500]},"example":1500},{"name":"words_typed","in":"query","required":false,"description":"Alternative to characters_typed: number of words (converted at 5 characters per word).","schema":{"description":"Alternative to characters_typed: number of words (converted at 5 characters per word).","type":"number","minimum":0,"maximum":2000000,"examples":[300]},"example":300},{"name":"minutes","in":"query","required":true,"description":"Duration of the test in minutes (e.g. 0.5 for 30 seconds). Unit: min.","schema":{"description":"Duration of the test in minutes (e.g. 0.5 for 30 seconds). Unit: min.","type":"number","maximum":1440,"exclusiveMinimum":0,"examples":[5],"x-unit":"min"},"example":5},{"name":"errors","in":"query","required":false,"description":"Number of wrong characters left in the final text.","schema":{"description":"Number of wrong characters left in the final text.","type":"integer","minimum":0,"maximum":10000000,"default":0,"examples":[10]},"example":10}],"x-calculator-id":"typing-speed","x-outputs":["gross_wpm [wpm]","net_wpm [wpm]","accuracy_percent [%]","cpm [cpm]","words_equivalent [words]"],"x-example":{"inputs":{"characters_typed":1500,"minutes":5,"errors":10},"expected":{"gross_wpm":60,"net_wpm":58,"accuracy_percent":99.33,"cpm":300,"words_equivalent":300}},"responses":{"200":{"description":"Result with values gross_wpm, net_wpm, accuracy_percent, cpm, words_equivalent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/gpa":{"get":{"operationId":"calculate_gpa","tags":["everyday"],"summary":"GPA Calculator","description":"Computes a grade point average as the credit-weighted mean of course grade points (quality points divided by total credits), with an unweighted average when credits are omitted, and the nearest US letter grade on the 4.0 scale.\n\nUse when: You have grade points (e.g. A = 4.0, B+ = 3.3) and credit hours for several courses and want the semester or cumulative GPA.\nDo not use when: You need the score required on a final exam (use final-grade), or a general weighted mean of other quantities (use weighted-average).\nFormula: GPA = Σ(grade_points_i × credits_i) / Σ credits_i; without credits GPA = mean(grade_points)\nDocs: https://tttkmbb.com/everyday/gpa.md","parameters":[{"name":"grade_points","in":"query","required":true,"description":"Grade points for each course on your scale, e.g. 4.0 for A, 3.7 for A−, 3.3 for B+, 3.0 for B, 2.0 for C, 1.0 for D, 0 for F.","schema":{"description":"Grade points for each course on your scale, e.g. 4.0 for A, 3.7 for A−, 3.3 for B+, 3.0 for B, 2.0 for C, 1.0 for D, 0 for F. Comma-separated list in query strings.","type":"string","minItems":1,"examples":[[4,3.7,3.3,4]]},"example":"4,3.7,3.3,4"},{"name":"credits","in":"query","required":false,"description":"Credit hours for each course, in the same order. Omit for an unweighted average (every course counts once).","schema":{"description":"Credit hours for each course, in the same order. Omit for an unweighted average (every course counts once). Comma-separated list in query strings.","type":"string","minItems":1,"examples":[[3,4,3,3]]},"example":"3,4,3,3"}],"x-calculator-id":"gpa","x-outputs":["gpa","total_credits [credits]","total_quality_points","courses","letter_grade_equivalent"],"x-example":{"inputs":{"grade_points":[4,3.7,3.3,4],"credits":[3,4,3,3]},"expected":{"gpa":3.75,"total_credits":13,"total_quality_points":48.7,"courses":4,"letter_grade_equivalent":"A-"}},"responses":{"200":{"description":"Result with values gpa, total_credits, total_quality_points, courses, letter_grade_equivalent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/final-grade":{"get":{"operationId":"calculate_required_final_grade","tags":["everyday"],"summary":"Final Grade Calculator","description":"Solves the weighted-average grade equation for the final exam score required to reach a desired overall grade, given the current grade and the final's weight, and reports whether that score is achievable.\n\nUse when: You know your current course grade and the final exam's weight and want the minimum final score for a target grade.\nDo not use when: Grades are combined by points or categories rather than a percentage weight (compute the weighted mean directly with weighted-average), or you need a GPA (use gpa).\nFormula: w = final_weight_percent / 100; required = (desired_grade_percent − current_grade_percent × (1 − w)) / w; max = current × (1 − w) + 100 × w; min = current × (1 − w)\nDocs: https://tttkmbb.com/everyday/final-grade.md","parameters":[{"name":"current_grade_percent","in":"query","required":true,"description":"Current weighted grade over all work except the final, in percent. Unit: %.","schema":{"description":"Current weighted grade over all work except the final, in percent. Unit: %.","type":"number","minimum":0,"maximum":150,"examples":[85],"x-unit":"%"},"example":85},{"name":"final_weight_percent","in":"query","required":true,"description":"Share of the overall grade determined by the final exam. Unit: %.","schema":{"description":"Share of the overall grade determined by the final exam. Unit: %.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[30],"x-unit":"%"},"example":30},{"name":"desired_grade_percent","in":"query","required":true,"description":"Overall grade you want to end up with. Unit: %.","schema":{"description":"Overall grade you want to end up with. Unit: %.","type":"number","minimum":0,"maximum":150,"examples":[90],"x-unit":"%"},"example":90}],"x-calculator-id":"final-grade","x-outputs":["required_final_percent [%]","achievable","assessment","max_possible_grade_percent [%]","min_possible_grade_percent [%]"],"x-example":{"inputs":{"current_grade_percent":85,"final_weight_percent":30,"desired_grade_percent":90},"expected":{"required_final_percent":101.67,"achievable":false,"max_possible_grade_percent":89.5,"min_possible_grade_percent":59.5}},"responses":{"200":{"description":"Result with values required_final_percent, achievable, assessment, max_possible_grade_percent, min_possible_grade_percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/sleep-cycles":{"get":{"operationId":"calculate_sleep_cycle_times","tags":["everyday"],"summary":"Sleep Cycle Calculator","description":"Suggests bedtimes for a given wake-up time, or wake-up times for a given bedtime, so that sleep ends at the boundary of a full sleep cycle (default 90 minutes) after a typical time to fall asleep (default 14 minutes).\n\nUse when: You want to pick a bedtime or alarm time that completes 3–6 whole sleep cycles instead of waking mid-cycle.\nDo not use when: You have a sleep disorder or shift-work schedule needing clinical advice; cycle length varies between people and through the night, so treat the times as approximations.\nFormula: wake_up_at: bedtime = time − fall_asleep_minutes − n × cycle_minutes; go_to_bed_at: wake time = time + fall_asleep_minutes + n × cycle_minutes; n = 3…6 (4.5–9 h of sleep at 90-minute cycles)\nDocs: https://tttkmbb.com/everyday/sleep-cycles.md","parameters":[{"name":"mode","in":"query","required":true,"description":"Whether the given time is the wake-up time or the time you go to bed. One of: wake_up_at, go_to_bed_at.","schema":{"description":"Whether the given time is the wake-up time or the time you go to bed.","type":"string","enum":["wake_up_at","go_to_bed_at"],"examples":["wake_up_at"]},"example":"wake_up_at"},{"name":"time","in":"query","required":true,"description":"The known wake-up time or bedtime, 24-hour HH:MM.","schema":{"description":"The known wake-up time or bedtime, 24-hour HH:MM.","type":"string","examples":["06:30"]},"example":"06:30"},{"name":"fall_asleep_minutes","in":"query","required":false,"description":"Average sleep-onset latency; 10–20 minutes is typical for healthy adults. Unit: min.","schema":{"description":"Average sleep-onset latency; 10–20 minutes is typical for healthy adults. Unit: min.","type":"integer","minimum":0,"maximum":120,"default":14,"examples":[14],"x-unit":"min"},"example":14},{"name":"cycle_minutes","in":"query","required":false,"description":"Length of one sleep cycle; 90 minutes is the usual average (range about 70–120). Unit: min.","schema":{"description":"Length of one sleep cycle; 90 minutes is the usual average (range about 70–120). Unit: min.","type":"integer","minimum":60,"maximum":120,"default":90,"examples":[90],"x-unit":"min"},"example":90}],"x-calculator-id":"sleep-cycles","x-outputs":["suggested_times","sleep_cycles","sleep_hours [h]","schedule"],"x-example":{"inputs":{"mode":"wake_up_at","time":"06:30"},"expected":{"suggested_times":["21:16","22:46","00:16","01:46"],"sleep_cycles":[6,5,4,3],"sleep_hours":[9,7.5,6,4.5]}},"responses":{"200":{"description":"Result with values suggested_times, sleep_cycles, sleep_hours, schedule","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/aspect-ratio":{"get":{"operationId":"calculate_aspect_ratio","tags":["everyday"],"summary":"Aspect Ratio Calculator","description":"Reduces a width and height to their simplest ratio and decimal value, identifies the closest common ratio (16:9, 4:3, 3:2, 21:9 …) and scales the dimensions to a new width or height while keeping the ratio.\n\nUse when: You need the aspect ratio of an image, screen or video, or the matching height for a new width (or width for a new height) when resizing.\nDo not use when: You need pixel density, file size or a crop to a different ratio; this only keeps the existing proportions.\nFormula: ratio = (width / g) : (height / g) with g = gcd(width, height); ratio_decimal = width / height; scaled_height = new_width × height / width; scaled_width = new_height × width / height\nDocs: https://tttkmbb.com/everyday/aspect-ratio.md","parameters":[{"name":"width","in":"query","required":true,"description":"Width in any unit (pixels, cm …).","schema":{"description":"Width in any unit (pixels, cm …).","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[1920]},"example":1920},{"name":"height","in":"query","required":true,"description":"Height in the same unit.","schema":{"description":"Height in the same unit.","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[1080]},"example":1080},{"name":"new_width","in":"query","required":false,"description":"Optional target width; the matching height is returned as scaled_height.","schema":{"description":"Optional target width; the matching height is returned as scaled_height.","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[1280]},"example":1280},{"name":"new_height","in":"query","required":false,"description":"Optional target height; the matching width is returned as scaled_width.","schema":{"description":"Optional target height; the matching width is returned as scaled_width.","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[1440]},"example":1440}],"x-calculator-id":"aspect-ratio","x-outputs":["ratio","ratio_decimal","closest_common_ratio","orientation","scaled_height","scaled_width"],"x-example":{"inputs":{"width":1920,"height":1080,"new_width":1280},"expected":{"ratio":"16:9","ratio_decimal":1.7778,"closest_common_ratio":"16:9","orientation":"landscape","scaled_height":720}},"responses":{"200":{"description":"Result with values ratio, ratio_decimal, closest_common_ratio, orientation, scaled_height, scaled_width","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/download-time":{"get":{"operationId":"estimate_download_time","tags":["everyday"],"summary":"Download Time Calculator","description":"Computes how long a file transfer takes from the file size (MB, GB, TB) and the connection speed (Mbit/s, MB/s or Gbit/s), converting bytes to bits at 8 bits per byte with decimal (SI) prefixes.\n\nUse when: You want to estimate how long a download, upload or backup will take at a given bandwidth, or compare connection speeds.\nDo not use when: You need to convert between data-storage units themselves (use data-storage); real transfers are also slowed by protocol overhead, server limits and Wi-Fi conditions.\nFormula: bits = file_size × bytes_per_unit × 8 (MB 10⁶, GB 10⁹, TB 10¹² bytes); bits_per_second = speed × (Mbit/s 10⁶, MB/s 8×10⁶, Gbit/s 10⁹); seconds = bits / bits_per_second\nDocs: https://tttkmbb.com/everyday/download-time.md","parameters":[{"name":"file_size","in":"query","required":true,"description":"Size of the file in the chosen unit.","schema":{"description":"Size of the file in the chosen unit.","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[4.7]},"example":4.7},{"name":"size_unit","in":"query","required":false,"description":"Unit of file_size (decimal SI prefixes). One of: mb, gb, tb.","schema":{"description":"Unit of file_size (decimal SI prefixes).","type":"string","enum":["mb","gb","tb"],"default":"gb","examples":["gb"]},"example":"gb"},{"name":"speed","in":"query","required":true,"description":"Transfer rate in the chosen unit.","schema":{"description":"Transfer rate in the chosen unit.","type":"number","maximum":1000000000,"exclusiveMinimum":0,"examples":[100]},"example":100},{"name":"speed_unit","in":"query","required":false,"description":"Unit of speed. Internet plans are quoted in megabits per second (Mbps); browsers show megabytes per second (MB/s), which is 8 times larger per unit. One of: mbit_per_s, mbyte_per_s, gbit_per_s.","schema":{"description":"Unit of speed. Internet plans are quoted in megabits per second (Mbps); browsers show megabytes per second (MB/s), which is 8 times larger per unit.","type":"string","enum":["mbit_per_s","mbyte_per_s","gbit_per_s"],"default":"mbit_per_s","examples":["mbit_per_s"]},"example":"mbit_per_s"}],"x-calculator-id":"download-time","x-outputs":["seconds [s]","time_formatted","minutes [min]","hours [h]","speed_mb_per_s [MB/s]"],"x-example":{"inputs":{"file_size":4.7,"size_unit":"gb","speed":100,"speed_unit":"mbit_per_s"},"expected":{"seconds":376,"time_formatted":"0:06:16","minutes":6.27,"hours":0.104,"speed_mb_per_s":12.5}},"responses":{"200":{"description":"Result with values seconds, time_formatted, minutes, hours, speed_mb_per_s","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/leap-year":{"get":{"operationId":"classify_leap_year","tags":["everyday"],"summary":"Leap Year Calculator","description":"Applies the Gregorian leap-year rule (divisible by 4, except centuries not divisible by 400) to a year and reports the reason, the number of days in the year and in February, and the next and previous leap years.\n\nUse when: You need to know whether a year has 29 February, why, or when the next leap year occurs.\nDo not use when: You need the weekday or ISO week of a specific date (use day-of-week) or day counts between dates (use date-difference).\nFormula: is_leap = (year mod 4 = 0 and year mod 100 ≠ 0) or year mod 400 = 0\nDocs: https://tttkmbb.com/everyday/leap-year.md","parameters":[{"name":"year","in":"query","required":true,"description":"Year in the (proleptic) Gregorian calendar.","schema":{"description":"Year in the (proleptic) Gregorian calendar.","type":"integer","minimum":1,"maximum":9999,"examples":[2024]},"example":2024}],"x-calculator-id":"leap-year","x-outputs":["is_leap","reason","days_in_year [days]","days_in_february [days]","next_leap_year","previous_leap_year"],"x-example":{"inputs":{"year":2024},"expected":{"is_leap":true,"reason":"Divisible by 4 and not by 100","days_in_year":366,"days_in_february":29,"next_leap_year":2028,"previous_leap_year":2020}},"responses":{"200":{"description":"Result with values is_leap, reason, days_in_year, days_in_february, next_leap_year, previous_leap_year","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/roman-numeral":{"get":{"operationId":"convert_roman_numeral","tags":["everyday"],"summary":"Roman Numeral Converter","description":"Converts an integer from 1 to 3999 into standard (subtractive-notation) Roman numerals, or parses a Roman numeral back into a number, and shows the value of each symbol group.\n\nUse when: You need to write a year, chapter or clock number in Roman numerals, or read one such as MCMXCIV.\nDo not use when: The number is 0, negative, 4000 or larger, or not an integer (standard Roman numerals cannot express these); for other number systems use base-converter.\nFormula: Greedy decomposition using M 1000, CM 900, D 500, CD 400, C 100, XC 90, L 50, XL 40, X 10, IX 9, V 5, IV 4, I 1; parsing accepts only the standard form M{0,3}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})\nDocs: https://tttkmbb.com/everyday/roman-numeral.md","parameters":[{"name":"mode","in":"query","required":true,"description":"Conversion direction. One of: to_roman, from_roman.","schema":{"description":"Conversion direction.","type":"string","enum":["to_roman","from_roman"],"examples":["to_roman"]},"example":"to_roman"},{"name":"value","in":"query","required":true,"description":"The integer (1–3999) for to_roman, or the Roman numeral (I, V, X, L, C, D, M; case-insensitive) for from_roman.","schema":{"description":"The integer (1–3999) for to_roman, or the Roman numeral (I, V, X, L, C, D, M; case-insensitive) for from_roman.","type":"string","examples":["1994"]},"example":"1994"}],"x-calculator-id":"roman-numeral","x-outputs":["roman","number","breakdown"],"x-example":{"inputs":{"mode":"to_roman","value":"1994"},"expected":{"roman":"MCMXCIV","number":1994,"breakdown":"M (1000) + CM (900) + XC (90) + IV (4)"}},"responses":{"200":{"description":"Result with values roman, number, breakdown","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/work-hours":{"get":{"operationId":"calculate_work_hours","tags":["everyday"],"summary":"Work Hours Calculator","description":"Derives paid hours per day from shift start and end times minus unpaid breaks, scales them to a week (working days), an average month (52/12 weeks) and a year (52 weeks), and multiplies by an optional hourly rate for pay.\n\nUse when: You want to know your working hours per week, month or year from a daily schedule, or the pay they represent at an hourly rate.\nDo not use when: Shifts vary day by day (sum each with time-duration), or you need salary conversions between periods without shift times (use salary-converter).\nFormula: hours_per_day = (end_time − start_time (+24 h if negative) − break_minutes) / 60; week = × days_per_week; month = week × 52 / 12; year = week × 52; pay = hours × hourly_rate\nDocs: https://tttkmbb.com/everyday/work-hours.md","parameters":[{"name":"start_time","in":"query","required":true,"description":"Start of the working day, 24-hour HH:MM.","schema":{"description":"Start of the working day, 24-hour HH:MM.","type":"string","examples":["09:00"]},"example":"09:00"},{"name":"end_time","in":"query","required":true,"description":"End of the working day, 24-hour HH:MM (an end time before the start time means the shift ends the next day).","schema":{"description":"End of the working day, 24-hour HH:MM (an end time before the start time means the shift ends the next day).","type":"string","examples":["17:30"]},"example":"17:30"},{"name":"break_minutes","in":"query","required":false,"description":"Unpaid break minutes per day. Unit: min.","schema":{"description":"Unpaid break minutes per day. Unit: min.","type":"integer","minimum":0,"maximum":1440,"default":0,"examples":[30],"x-unit":"min"},"example":30},{"name":"days_per_week","in":"query","required":false,"description":"Number of such working days per week. Unit: days.","schema":{"description":"Number of such working days per week. Unit: days.","type":"integer","minimum":1,"maximum":7,"default":5,"examples":[5],"x-unit":"days"},"example":5},{"name":"hourly_rate","in":"query","required":false,"description":"Optional gross pay per hour; adds pay outputs.","schema":{"description":"Optional gross pay per hour; adds pay outputs.","type":"number","minimum":0,"maximum":100000,"examples":[25]},"example":25}],"x-calculator-id":"work-hours","x-outputs":["hours_per_day [h]","hours_per_week [h]","hours_per_month [h]","hours_per_year [h]","daily_pay","weekly_pay","monthly_pay","annual_pay"],"x-example":{"inputs":{"start_time":"09:00","end_time":"17:30","break_minutes":30,"days_per_week":5,"hourly_rate":25},"expected":{"hours_per_day":8,"hours_per_week":40,"hours_per_month":173.33,"hours_per_year":2080,"daily_pay":200,"weekly_pay":1000,"monthly_pay":4333.33,"annual_pay":52000}},"responses":{"200":{"description":"Result with values hours_per_day, hours_per_week, hours_per_month, hours_per_year, daily_pay, weekly_pay, monthly_pay, annual_pay","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/recipe-scaler":{"get":{"operationId":"scale_recipe","tags":["food"],"summary":"Recipe Scaler","description":"Computes the conversion factor between an original and a desired number of servings and multiplies a list of ingredient amounts by it.\n\nUse when: You need to enlarge or reduce a recipe for a different number of servings and want every ingredient quantity scaled consistently.\nDo not use when: You need to convert between measurement units (use cooking-converter) or to work with baker's percentages for dough (use bakers-percentage).\nFormula: scale_factor = desired_servings / original_servings; scaled_amount_i = ingredient_amount_i × scale_factor\nDocs: https://tttkmbb.com/food/recipe-scaler.md","parameters":[{"name":"original_servings","in":"query","required":true,"description":"Number of servings (or yield) the original recipe makes. Unit: servings.","schema":{"description":"Number of servings (or yield) the original recipe makes. Unit: servings.","type":"number","maximum":100000,"exclusiveMinimum":0,"examples":[4],"x-unit":"servings"},"example":4},{"name":"desired_servings","in":"query","required":true,"description":"Number of servings you want to make. Unit: servings.","schema":{"description":"Number of servings you want to make. Unit: servings.","type":"number","maximum":100000,"exclusiveMinimum":0,"examples":[10],"x-unit":"servings"},"example":10},{"name":"ingredient_amounts","in":"query","required":false,"description":"Optional list of ingredient quantities from the original recipe, in any units, in order; each is multiplied by the scale factor.","schema":{"description":"Optional list of ingredient quantities from the original recipe, in any units, in order; each is multiplied by the scale factor. Comma-separated list in query strings.","type":"string","examples":[[200,3,0.5]]},"example":"200,3,0.5"}],"x-calculator-id":"recipe-scaler","x-outputs":["scale_factor","scale_percent [%]","scaled_amounts"],"x-example":{"inputs":{"original_servings":4,"desired_servings":10,"ingredient_amounts":[200,3,0.5]},"expected":{"scale_factor":2.5,"scale_percent":250,"scaled_amounts":[500,7.5,1.25]}},"responses":{"200":{"description":"Result with values scale_factor, scale_percent, scaled_amounts","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/cooking-converter":{"get":{"operationId":"convert_cooking_measurement","tags":["food"],"summary":"Cooking Measurement Converter","description":"Converts a kitchen volume between US customary units (teaspoon, tablespoon, fluid ounce, cup, pint, quart), the 250 ml metric cup, millilitres and litres using the exact US definitions.\n\nUse when: A recipe uses cups, tablespoons or fluid ounces and you need millilitres (or the reverse), or you need to switch between US and metric cups.\nDo not use when: You need grams: converting volume to weight requires the ingredient's density (e.g. 1 US cup of flour ≈ 120 g but of water ≈ 237 g), which this calculator does not do.\nFormula: result = value × ml_per(from_unit) / ml_per(to_unit); ml per unit: tsp 4.92892, tbsp 14.7868, fl oz 29.5735, US cup 236.588, metric cup 250, US pint 473.176, US quart 946.353, litre 1000\nDocs: https://tttkmbb.com/food/cooking-converter.md","parameters":[{"name":"value","in":"query","required":true,"description":"Quantity to convert, in from_unit.","schema":{"description":"Quantity to convert, in from_unit.","type":"number","minimum":0,"maximum":1000000,"examples":[2]},"example":2},{"name":"from_unit","in":"query","required":true,"description":"Unit of the input amount. One of: tsp, tbsp, fl_oz_us, cup_us, cup_metric, ml, l, pint_us, quart_us.","schema":{"description":"Unit of the input amount.","type":"string","enum":["tsp","tbsp","fl_oz_us","cup_us","cup_metric","ml","l","pint_us","quart_us"],"examples":["cup_us"]},"example":"cup_us"},{"name":"to_unit","in":"query","required":true,"description":"Unit to convert into. One of: tsp, tbsp, fl_oz_us, cup_us, cup_metric, ml, l, pint_us, quart_us.","schema":{"description":"Unit to convert into.","type":"string","enum":["tsp","tbsp","fl_oz_us","cup_us","cup_metric","ml","l","pint_us","quart_us"],"examples":["ml"]},"example":"ml"}],"x-calculator-id":"cooking-converter","x-outputs":["result","value_ml [ml]","conversion_factor"],"x-example":{"inputs":{"value":2,"from_unit":"cup_us","to_unit":"ml"},"expected":{"result":473.1765,"value_ml":473.176,"conversion_factor":236.588237}},"responses":{"200":{"description":"Result with values result, value_ml, conversion_factor","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/coffee-ratio":{"get":{"operationId":"calculate_coffee_ratio","tags":["food"],"summary":"Coffee Ratio Calculator","description":"Computes the grams of ground coffee for a given amount of water (or the water for a given dose) from a brew ratio, using method-specific default ratios (drip and pour-over 1:16, French press 1:15, AeroPress 1:13, cold brew concentrate 1:8, espresso 1:2) or a custom ratio.\n\nUse when: You want to know how much coffee to use for a certain volume of water, how much water a dose of coffee needs, or the ratio implied by amounts you already used.\nDo not use when: You need caffeine content or extraction/TDS calculations; ratios here are by weight of dry coffee and water only.\nFormula: coffee_g = water_ml / ratio (or water_ml = coffee_g × ratio); coffee_g_per_liter = 1000 / ratio; tablespoons ≈ coffee_g / 5.5\nDocs: https://tttkmbb.com/food/coffee-ratio.md","parameters":[{"name":"water_ml","in":"query","required":false,"description":"Brew water in millilitres (≈ grams). Give this and/or coffee_g. Unit: ml.","schema":{"description":"Brew water in millilitres (≈ grams). Give this and/or coffee_g. Unit: ml.","type":"number","maximum":100000,"exclusiveMinimum":0,"examples":[500],"x-unit":"ml"},"example":500},{"name":"coffee_g","in":"query","required":false,"description":"Ground coffee in grams. If both water_ml and coffee_g are given, the calculator reports the ratio they imply. Unit: g.","schema":{"description":"Ground coffee in grams. If both water_ml and coffee_g are given, the calculator reports the ratio they imply. Unit: g.","type":"number","maximum":10000,"exclusiveMinimum":0,"examples":[30],"x-unit":"g"},"example":30},{"name":"brew_method","in":"query","required":false,"description":"Sets the default ratio (water parts per 1 part coffee) when no custom ratio is given. One of: drip, pour_over, french_press, aeropress, cold_brew, espresso.","schema":{"description":"Sets the default ratio (water parts per 1 part coffee) when no custom ratio is given.","type":"string","enum":["drip","pour_over","french_press","aeropress","cold_brew","espresso"],"default":"drip","examples":["drip"]},"example":"drip"},{"name":"ratio","in":"query","required":false,"description":"Water parts per 1 part coffee by weight, e.g. 16 for 1:16; overrides the brew-method default.","schema":{"description":"Water parts per 1 part coffee by weight, e.g. 16 for 1:16; overrides the brew-method default.","type":"number","minimum":1,"maximum":30,"examples":[16]},"example":16}],"x-calculator-id":"coffee-ratio","x-outputs":["coffee_g [g]","water_ml [ml]","ratio","ratio_text","coffee_g_per_liter [g/L]","tablespoons_approx [tbsp]"],"x-example":{"inputs":{"water_ml":500,"brew_method":"drip"},"expected":{"coffee_g":31.3,"water_ml":500,"ratio":16,"ratio_text":"1:16","coffee_g_per_liter":62.5}},"responses":{"200":{"description":"Result with values coffee_g, water_ml, ratio, ratio_text, coffee_g_per_liter, tablespoons_approx","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/calories-from-macros":{"get":{"operationId":"calculate_calories_from_macros","tags":["food"],"summary":"Calories from Macros Calculator","description":"Converts grams of protein, carbohydrate, fat and alcohol into kilocalories and kilojoules with the Atwater general factors (4 / 4 / 9 / 7 kcal per gram) and reports each macronutrient's share of total energy.\n\nUse when: You have the macronutrient grams of a food, meal or daily intake and need total calories or the percentage split, e.g. to check a food label or diet plan.\nDo not use when: You want to go the other way, from a calorie target to gram targets (use macros), or need calorie needs (use tdee).\nFormula: kcal = 4·protein_g + 4·(carbs_g − fiber_g) + 2·fiber_g + 9·fat_g + 7·alcohol_g; percent_x = kcal_x / kcal × 100; kJ = kcal × 4.184\nDocs: https://tttkmbb.com/food/calories-from-macros.md","parameters":[{"name":"protein_g","in":"query","required":true,"description":"Protein in grams. Unit: g.","schema":{"description":"Protein in grams. Unit: g.","type":"number","minimum":0,"maximum":5000,"examples":[30],"x-unit":"g"},"example":30},{"name":"carbs_g","in":"query","required":true,"description":"Total carbohydrate in grams, including any fibre. Unit: g.","schema":{"description":"Total carbohydrate in grams, including any fibre. Unit: g.","type":"number","minimum":0,"maximum":5000,"examples":[40],"x-unit":"g"},"example":40},{"name":"fat_g","in":"query","required":true,"description":"Fat in grams. Unit: g.","schema":{"description":"Fat in grams. Unit: g.","type":"number","minimum":0,"maximum":5000,"examples":[10],"x-unit":"g"},"example":10},{"name":"alcohol_g","in":"query","required":false,"description":"Ethanol in grams (a 330 ml 5 % beer contains about 13 g). Unit: g.","schema":{"description":"Ethanol in grams (a 330 ml 5 % beer contains about 13 g). Unit: g.","type":"number","minimum":0,"maximum":1000,"default":0,"examples":[0],"x-unit":"g"},"example":0},{"name":"fiber_g","in":"query","required":false,"description":"Optional fibre included in carbs_g; counted at 2 kcal/g (EU labelling factor) instead of 4 kcal/g. Unit: g.","schema":{"description":"Optional fibre included in carbs_g; counted at 2 kcal/g (EU labelling factor) instead of 4 kcal/g. Unit: g.","type":"number","minimum":0,"maximum":1000,"examples":[5],"x-unit":"g"},"example":5}],"x-calculator-id":"calories-from-macros","x-outputs":["calories_kcal [kcal]","energy_kj [kJ]","protein_kcal [kcal]","carbs_kcal [kcal]","fat_kcal [kcal]","alcohol_kcal [kcal]","protein_percent [%]","carbs_percent [%]","fat_percent [%]","alcohol_percent [%]"],"x-example":{"inputs":{"protein_g":30,"carbs_g":40,"fat_g":10},"expected":{"calories_kcal":370,"energy_kj":1548,"protein_kcal":120,"carbs_kcal":160,"fat_kcal":90,"protein_percent":32.4,"carbs_percent":43.2,"fat_percent":24.3,"alcohol_percent":0}},"responses":{"200":{"description":"Result with values calories_kcal, energy_kj, protein_kcal, carbs_kcal, fat_kcal, alcohol_kcal, protein_percent, carbs_percent, fat_percent, alcohol_percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/pizza-dough":{"get":{"operationId":"calculate_pizza_dough","tags":["food"],"summary":"Pizza Dough Calculator","description":"Computes the flour, water, salt, yeast and oil in grams for a number of pizza dough balls of a given weight from baker's percentages (hydration, salt, yeast, oil as % of flour).\n\nUse when: You want exact gram amounts for a batch of pizza dough balls, e.g. 4 balls of 250 g at 62 % hydration.\nDo not use when: You are starting from a known flour weight or need custom ingredients (use bakers-percentage), or you need bread with preferments or several flours.\nFormula: total = number_of_pizzas × ball_weight_g; flour = total / (1 + (hydration + salt + yeast + oil) / 100); water = flour × hydration/100; salt = flour × salt/100; yeast = flour × yeast/100; oil = flour × oil/100\nDocs: https://tttkmbb.com/food/pizza-dough.md","parameters":[{"name":"number_of_pizzas","in":"query","required":true,"description":"How many dough balls (pizzas) to make.","schema":{"description":"How many dough balls (pizzas) to make.","type":"integer","minimum":1,"maximum":1000,"examples":[4]},"example":4},{"name":"ball_weight_g","in":"query","required":false,"description":"Weight of one dough ball; 200–280 g gives a 22–35 cm Neapolitan pizza, 300–350 g a 12-inch New York style. Unit: g.","schema":{"description":"Weight of one dough ball; 200–280 g gives a 22–35 cm Neapolitan pizza, 300–350 g a 12-inch New York style. Unit: g.","type":"number","minimum":50,"maximum":2000,"default":250,"examples":[250],"x-unit":"g"},"example":250},{"name":"hydration_percent","in":"query","required":false,"description":"Water as a percentage of flour weight (Neapolitan 55–62 %, home-oven doughs 60–70 %). Unit: %.","schema":{"description":"Water as a percentage of flour weight (Neapolitan 55–62 %, home-oven doughs 60–70 %). Unit: %.","type":"number","minimum":40,"maximum":100,"default":62,"examples":[62],"x-unit":"%"},"example":62},{"name":"salt_percent","in":"query","required":false,"description":"Salt as a percentage of flour weight (typically 2–3 %). Unit: %.","schema":{"description":"Salt as a percentage of flour weight (typically 2–3 %). Unit: %.","type":"number","minimum":0,"maximum":5,"default":2,"examples":[2],"x-unit":"%"},"example":2},{"name":"yeast_percent","in":"query","required":false,"description":"Instant dry yeast as a percentage of flour; use about 3× for fresh yeast, and less for long cold fermentation. Unit: %.","schema":{"description":"Instant dry yeast as a percentage of flour; use about 3× for fresh yeast, and less for long cold fermentation. Unit: %.","type":"number","minimum":0,"maximum":5,"default":0.3,"examples":[0.3],"x-unit":"%"},"example":0.3},{"name":"oil_percent","in":"query","required":false,"description":"Olive oil as a percentage of flour (0 for Neapolitan, 2–4 % for New York style). Unit: %.","schema":{"description":"Olive oil as a percentage of flour (0 for Neapolitan, 2–4 % for New York style). Unit: %.","type":"number","minimum":0,"maximum":15,"default":0,"examples":[0],"x-unit":"%"},"example":0}],"x-calculator-id":"pizza-dough","x-outputs":["flour_g [g]","water_g [g]","salt_g [g]","yeast_g [g]","oil_g [g]","total_dough_g [g]"],"x-example":{"inputs":{"number_of_pizzas":4,"ball_weight_g":250,"hydration_percent":62,"salt_percent":2,"yeast_percent":0.3,"oil_percent":0},"expected":{"total_dough_g":1000,"flour_g":608.6,"water_g":377.4,"salt_g":12.2,"yeast_g":1.83,"oil_g":0}},"responses":{"200":{"description":"Result with values flour_g, water_g, salt_g, yeast_g, oil_g, total_dough_g","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/brine":{"get":{"operationId":"calculate_brine","tags":["food"],"summary":"Brine Calculator","description":"Computes the grams of salt (and optional sugar) for a wet brine from the water volume and a percentage concentration expressed relative to the water weight (6 % = 60 g per litre).\n\nUse when: You are brining poultry, pork or vegetables and need the salt for a given amount of water at a target strength.\nDo not use when: You need a dry brine or an equilibrium brine based on the meat's weight (salt = 0.5–2 % of meat + water weight), or curing with nitrite salts, which follow different rules.\nFormula: salt_g = water_liters × 1000 × salt_percent / 100; sugar_g = water_liters × 1000 × sugar_percent / 100; salt_percent_of_solution = 100 × salt_g / (water_g + salt_g + sugar_g)\nDocs: https://tttkmbb.com/food/brine.md","parameters":[{"name":"water_liters","in":"query","required":true,"description":"Volume of water in litres (1 L = 1 kg). Unit: L.","schema":{"description":"Volume of water in litres (1 L = 1 kg). Unit: L.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[2],"x-unit":"L"},"example":2},{"name":"salt_percent","in":"query","required":false,"description":"Salt as a percentage of the water weight: 3–4 % mild (long brines), 5–6 % standard for poultry (4–12 h), 8–10 % quick brines (1–2 h). Unit: %.","schema":{"description":"Salt as a percentage of the water weight: 3–4 % mild (long brines), 5–6 % standard for poultry (4–12 h), 8–10 % quick brines (1–2 h). Unit: %.","type":"number","minimum":0.5,"maximum":30,"default":6,"examples":[6],"x-unit":"%"},"example":6},{"name":"sugar_percent","in":"query","required":false,"description":"Optional sugar as a percentage of the water weight (often half the salt). Unit: %.","schema":{"description":"Optional sugar as a percentage of the water weight (often half the salt). Unit: %.","type":"number","minimum":0,"maximum":30,"default":0,"examples":[3],"x-unit":"%"},"example":3}],"x-calculator-id":"brine","x-outputs":["salt_g [g]","sugar_g [g]","water_g [g]","brine_total_g [g]","salt_percent_of_solution [%]"],"x-example":{"inputs":{"water_liters":2,"salt_percent":6,"sugar_percent":3},"expected":{"salt_g":120,"sugar_g":60,"water_g":2000,"brine_total_g":2180,"salt_percent_of_solution":5.5}},"responses":{"200":{"description":"Result with values salt_g, sugar_g, water_g, brine_total_g, salt_percent_of_solution","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/rice-water":{"get":{"operationId":"calculate_rice_water_ratio","tags":["food"],"summary":"Rice to Water Ratio Calculator","description":"Computes the water needed for a quantity of uncooked rice (cups or grams) using absorption-method ratios by rice type: long-grain white 1:1.5, jasmine 1:1.25, basmati 1:1.5, brown 1:2, sushi 1:1.1, wild 1:3.\n\nUse when: You are cooking rice by the absorption method (tight lid or rice cooker) and need the water amount for a given quantity and type of rice.\nDo not use when: You boil rice in excess water and drain it (ratio irrelevant), cook risotto or paella, or follow a package instruction that specifies a different ratio for that product.\nFormula: rice_cups = rice_g / 185 (if grams given); water_cups = rice_cups × ratio; water_ml = water_cups × 236.588; ratio: white_long 1.5, jasmine 1.25, basmati 1.5, brown 2, sushi 1.1, wild 3\nDocs: https://tttkmbb.com/food/rice-water.md","parameters":[{"name":"rice_cups","in":"query","required":false,"description":"Uncooked rice in US cups (236.6 ml). Give this or rice_g. Unit: cups.","schema":{"description":"Uncooked rice in US cups (236.6 ml). Give this or rice_g. Unit: cups.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[2],"x-unit":"cups"},"example":2},{"name":"rice_g","in":"query","required":false,"description":"Uncooked rice in grams; converted at 185 g per cup. Ignored when rice_cups is given. Unit: g.","schema":{"description":"Uncooked rice in grams; converted at 185 g per cup. Ignored when rice_cups is given. Unit: g.","type":"number","maximum":20000,"exclusiveMinimum":0,"examples":[370],"x-unit":"g"},"example":370},{"name":"rice_type","in":"query","required":false,"description":"Rice type; sets the water-to-rice volume ratio. One of: white_long, jasmine, basmati, brown, sushi, wild.","schema":{"description":"Rice type; sets the water-to-rice volume ratio.","type":"string","enum":["white_long","jasmine","basmati","brown","sushi","wild"],"default":"white_long","examples":["jasmine"]},"example":"jasmine"}],"x-calculator-id":"rice-water","x-outputs":["water_cups [cups]","water_ml [ml]","rice_cups_used [cups]","ratio","cooked_rice_cups_approx [cups]"],"x-example":{"inputs":{"rice_cups":2,"rice_type":"jasmine"},"expected":{"water_cups":2.5,"water_ml":591,"rice_cups_used":2,"ratio":"1:1.25"}},"responses":{"200":{"description":"Result with values water_cups, water_ml, rice_cups_used, ratio, cooked_rice_cups_approx","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/bakers-percentage":{"get":{"operationId":"calculate_bakers_percentage","tags":["food"],"summary":"Baker's Percentage Calculator","description":"Converts a bread or dough formula between baker's percentages and grams: flour is 100 %, every other ingredient is expressed relative to flour weight; works in both directions and reports total dough weight and hydration.\n\nUse when: You know the flour weight and the formula percentages (or the ingredient grams) and want the other representation, e.g. to scale or compare bread recipes.\nDo not use when: You want a ready-made pizza formula from ball count and weight (use pizza-dough) or plain servings-based scaling (use recipe-scaler).\nFormula: grams_i = flour_g × percent_i / 100; percent_i = grams_i / flour_g × 100; total_dough = flour_g + Σ grams_i; total_percent = 100 + Σ percent_i\nDocs: https://tttkmbb.com/food/bakers-percentage.md","parameters":[{"name":"flour_g","in":"query","required":true,"description":"Total flour weight (= 100 %). Unit: g.","schema":{"description":"Total flour weight (= 100 %). Unit: g.","type":"number","maximum":1000000,"exclusiveMinimum":0,"examples":[500],"x-unit":"g"},"example":500},{"name":"ingredient_names","in":"query","required":true,"description":"Names of the non-flour ingredients, in order (comma-separated; use underscores instead of spaces, e.g. olive_oil).","schema":{"description":"Names of the non-flour ingredients, in order (comma-separated; use underscores instead of spaces, e.g. olive_oil). Comma-separated list in query strings.","type":"string","examples":[["water","salt","yeast"]]},"example":"water,salt,yeast"},{"name":"ingredient_percents","in":"query","required":false,"description":"Baker's percentage of each ingredient (same order as the names). Give this to get grams.","schema":{"description":"Baker's percentage of each ingredient (same order as the names). Give this to get grams. Comma-separated list in query strings.","type":"string","examples":[[65,2,1]]},"example":"65,2,1"},{"name":"ingredient_grams","in":"query","required":false,"description":"Weight of each ingredient in grams (same order). Used when ingredient_percents is not given, to get percentages.","schema":{"description":"Weight of each ingredient in grams (same order). Used when ingredient_percents is not given, to get percentages. Comma-separated list in query strings.","type":"string","examples":[[325,10,5]]},"example":"325,10,5"}],"x-calculator-id":"bakers-percentage","x-outputs":["ingredients","total_dough_g [g]","total_percent [%]","hydration_percent [%]"],"x-example":{"inputs":{"flour_g":500,"ingredient_names":["water","salt","yeast"],"ingredient_percents":[65,2,1]},"expected":{"ingredients":[{"ingredient":"water","percent":65,"grams":325},{"ingredient":"salt","percent":2,"grams":10},{"ingredient":"yeast","percent":1,"grams":5}],"total_dough_g":840,"total_percent":168,"hydration_percent":65}},"responses":{"200":{"description":"Result with values ingredients, total_dough_g, total_percent, hydration_percent","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/turkey-cooking-time":{"get":{"operationId":"estimate_turkey_cooking_time","tags":["food"],"summary":"Turkey Cooking Time Calculator","description":"Looks up the USDA FSIS roasting timetable for a whole turkey at 325 °F (163 °C) by weight and stuffing, returning the time range in minutes, the 165 °F (74 °C) safe internal temperature and refrigerator thawing time.\n\nUse when: You need to plan how long a turkey of a given weight takes to roast in a conventional oven and when to start thawing it.\nDo not use when: You are deep-frying, smoking, spatchcocking, cooking a turkey breast only over 8 lb, or roasting at a different oven temperature; the USDA table covers whole birds at 325 °F only.\nFormula: Lookup by weight_lb in the USDA FSIS timetable (325 °F): unstuffed 8–12 lb 2¾–3 h, 12–14 lb 3–3¾ h, 14–18 lb 3¾–4¼ h, 18–20 lb 4¼–4½ h, 20–24 lb 4½–5 h (breast 4–6 lb 1½–2¼ h, 6–8 lb 2¼–3¼ h); stuffed 8–12 lb 3–3½ h, 12–14 lb 3½–4 h, 14–18 lb 4–4¼ h, 18–20 lb 4¼–4¾ h, 20–24 lb 4¾–5¼ h; thaw_days = weight_lb / 5 to weight_lb / 4\nDocs: https://tttkmbb.com/food/turkey-cooking-time.md","parameters":[{"name":"weight","in":"query","required":true,"description":"Weight of the whole (thawed) turkey, in weight_unit. Covered range: 4–24 lb (1.8–10.9 kg) unstuffed, 8–24 lb stuffed.","schema":{"description":"Weight of the whole (thawed) turkey, in weight_unit. Covered range: 4–24 lb (1.8–10.9 kg) unstuffed, 8–24 lb stuffed.","type":"number","maximum":50,"exclusiveMinimum":0,"examples":[6.5]},"example":6.5},{"name":"weight_unit","in":"query","required":false,"description":"Unit of the weight input. One of: kg, lb.","schema":{"description":"Unit of the weight input.","type":"string","enum":["kg","lb"],"default":"kg","examples":["kg"]},"example":"kg"},{"name":"stuffed","in":"query","required":false,"description":"true if the cavity is filled with stuffing (adds roughly 15–45 minutes and the stuffing must also reach 165 °F).","schema":{"description":"true if the cavity is filled with stuffing (adds roughly 15–45 minutes and the stuffing must also reach 165 °F).","type":"boolean","default":false,"examples":[false]},"example":false},{"name":"oven_temperature","in":"query","required":false,"description":"Oven setting; the USDA timetable is defined for 325 °F only. One of: 163c_325f.","schema":{"description":"Oven setting; the USDA timetable is defined for 325 °F only.","type":"string","enum":["163c_325f"],"default":"163c_325f","examples":["163c_325f"]},"example":"163c_325f"}],"x-calculator-id":"turkey-cooking-time","x-outputs":["min_minutes [min]","max_minutes [min]","time_range","weight_lb [lb]","weight_kg [kg]","usda_weight_band","safe_internal_temp_c [°C]","safe_internal_temp_f [°F]","thaw_refrigerator_days"],"x-example":{"inputs":{"weight":6.5,"weight_unit":"kg","stuffed":false},"expected":{"weight_lb":14.3,"min_minutes":225,"max_minutes":255,"time_range":"3 h 45 min – 4 h 15 min","usda_weight_band":"14 to 18 lb, unstuffed","safe_internal_temp_c":74,"safe_internal_temp_f":165}},"responses":{"200":{"description":"Result with values min_minutes, max_minutes, time_range, weight_lb, weight_kg, usda_weight_band, safe_internal_temp_c, safe_internal_temp_f, thaw_refrigerator_days","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/flooring":{"get":{"operationId":"estimate_flooring_materials","tags":["construction"],"summary":"Flooring Calculator","description":"Computes the floor area of a rectangular room, adds a cutting-waste allowance and converts the result into the number of boxes to buy from the coverage printed on the packaging. Areas are reported in m² and ft².\n\nUse when: You need to order laminate, vinyl plank, hardwood, carpet tiles or underlay for a room and want the area with waste and the box count.\nDo not use when: You are counting individual tiles with grout joints (use tile), boards for an outdoor deck (use decking) or the room is L-shaped: split it into rectangles, run this for each and add the results (or use rectangle for the areas).\nFormula: area = room_length × room_width; area_with_waste = area × (1 + waste_percent/100); boxes_needed = ceil(area_with_waste / box_coverage). 1 ft² = 0.09290304 m².\nDocs: https://tttkmbb.com/construction/flooring.md","parameters":[{"name":"unit_system","in":"query","required":false,"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems. One of: metric, imperial.","schema":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"example":"metric"},{"name":"room_length","in":"query","required":true,"description":"Room length in metres (metric) or feet (imperial). Unit: m or ft.","schema":{"description":"Room length in metres (metric) or feet (imperial). Unit: m or ft.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[5],"x-unit":"m or ft"},"example":5},{"name":"room_width","in":"query","required":true,"description":"Room width in metres or feet. Unit: m or ft.","schema":{"description":"Room width in metres or feet. Unit: m or ft.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[4],"x-unit":"m or ft"},"example":4},{"name":"waste_percent","in":"query","required":false,"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). Use 5–10 % for straight layouts and about 15 % for diagonal or herringbone patterns. Unit: %.","schema":{"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). Use 5–10 % for straight layouts and about 15 % for diagonal or herringbone patterns. Unit: %.","type":"number","minimum":0,"maximum":50,"default":10,"examples":[10],"x-unit":"%"},"example":10},{"name":"box_coverage","in":"query","required":false,"description":"Area covered by one box or carton, in m² (metric) or ft² (imperial), as printed on the packaging. Optional; enables the box count. Unit: m² or ft².","schema":{"description":"Area covered by one box or carton, in m² (metric) or ft² (imperial), as printed on the packaging. Optional; enables the box count. Unit: m² or ft².","type":"number","exclusiveMinimum":0,"examples":[2.2],"x-unit":"m² or ft²"},"example":2.2}],"x-calculator-id":"flooring","x-outputs":["area_m2 [m²]","area_ft2 [ft²]","area_with_waste_m2 [m²]","area_with_waste_ft2 [ft²]","boxes_needed"],"x-example":{"inputs":{"unit_system":"metric","room_length":5,"room_width":4,"waste_percent":10,"box_coverage":2.2},"expected":{"area_m2":20,"area_ft2":215.28,"area_with_waste_m2":22,"area_with_waste_ft2":236.81,"boxes_needed":10}},"responses":{"200":{"description":"Result with values area_m2, area_ft2, area_with_waste_m2, area_with_waste_ft2, boxes_needed","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/paint":{"get":{"operationId":"estimate_paint_needed","tags":["construction"],"summary":"Paint Calculator","description":"Estimates wall paint from the wall area (room length, width and height, or a given area), subtracting 1.9 m² per door and 1.4 m² per window, multiplying by the number of coats and dividing by the coverage rate; reports litres, US gallons and cans.\n\nUse when: You need to know how much paint to buy for the walls of a room or for a known wall area, in litres or gallons and cans.\nDo not use when: You need ceiling, floor or exterior siding paint with different coverage rates (enter the area and the product's coverage directly), or you need the wall area only (use rectangle).\nFormula: gross = 2 × (room_length + room_width) × wall_height (or wall_area); paintable = gross − 1.9 m² × doors − 1.4 m² × windows; litres = paintable_m² × coats / coverage_m²_per_L; gallons = litres / 3.785; cans = ceil(litres / can_size). Imperial coverage: ft²/gal × 0.09290304 / 3.785411784 = m²/L.\nDocs: https://tttkmbb.com/construction/paint.md","parameters":[{"name":"unit_system","in":"query","required":false,"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems. One of: metric, imperial.","schema":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"example":"metric"},{"name":"room_length","in":"query","required":false,"description":"Room length (m or ft). Used with room_width and wall_height when wall_area is not given. Unit: m or ft.","schema":{"description":"Room length (m or ft). Used with room_width and wall_height when wall_area is not given. Unit: m or ft.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[5],"x-unit":"m or ft"},"example":5},{"name":"room_width","in":"query","required":false,"description":"Room width (m or ft). Unit: m or ft.","schema":{"description":"Room width (m or ft). Unit: m or ft.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[4],"x-unit":"m or ft"},"example":4},{"name":"wall_height","in":"query","required":false,"description":"Floor-to-ceiling height (m or ft). Unit: m or ft.","schema":{"description":"Floor-to-ceiling height (m or ft). Unit: m or ft.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[2.4],"x-unit":"m or ft"},"example":2.4},{"name":"wall_area","in":"query","required":false,"description":"Gross wall area before openings (m² or ft²). When given, the room dimensions are ignored. Unit: m² or ft².","schema":{"description":"Gross wall area before openings (m² or ft²). When given, the room dimensions are ignored. Unit: m² or ft².","type":"number","exclusiveMinimum":0,"x-unit":"m² or ft²"}},{"name":"doors","in":"query","required":false,"description":"Number of doors; 1.9 m² (20.5 ft²) is subtracted per door.","schema":{"description":"Number of doors; 1.9 m² (20.5 ft²) is subtracted per door.","type":"integer","minimum":0,"maximum":100,"default":1,"examples":[1]},"example":1},{"name":"windows","in":"query","required":false,"description":"Number of windows; 1.4 m² (15.1 ft²) is subtracted per window.","schema":{"description":"Number of windows; 1.4 m² (15.1 ft²) is subtracted per window.","type":"integer","minimum":0,"maximum":100,"default":1,"examples":[2]},"example":2},{"name":"coats","in":"query","required":false,"description":"Number of coats. Two coats are standard for colour changes; primer is not included.","schema":{"description":"Number of coats. Two coats are standard for colour changes; primer is not included.","type":"integer","minimum":1,"maximum":5,"default":2,"examples":[2]},"example":2},{"name":"coverage","in":"query","required":false,"description":"Coverage from the tin: m² per litre in metric (default 10) or ft² per US gallon in imperial (default 350). Typical emulsion covers 10–14 m²/L (350–400 ft²/gal).","schema":{"description":"Coverage from the tin: m² per litre in metric (default 10) or ft² per US gallon in imperial (default 350). Typical emulsion covers 10–14 m²/L (350–400 ft²/gal).","type":"number","exclusiveMinimum":0,"examples":[10]},"example":10},{"name":"can_size","in":"query","required":false,"description":"Litres per can (metric, default 5) or US gallons per can (imperial, default 1); used for the can count.","schema":{"description":"Litres per can (metric, default 5) or US gallons per can (imperial, default 1); used for the can count.","type":"number","exclusiveMinimum":0,"examples":[5]},"example":5}],"x-calculator-id":"paint","x-outputs":["gross_wall_area_m2 [m²]","gross_wall_area_ft2 [ft²]","paintable_area_m2 [m²]","paintable_area_ft2 [ft²]","paint_liters [L]","paint_gallons [US gal]","cans_needed","can_size_used"],"x-example":{"inputs":{"unit_system":"metric","room_length":5,"room_width":4,"wall_height":2.4,"doors":1,"windows":2,"coats":2,"coverage":10,"can_size":5},"expected":{"gross_wall_area_m2":43.2,"gross_wall_area_ft2":465,"paintable_area_m2":38.5,"paintable_area_ft2":414.41,"paint_liters":7.7,"paint_gallons":2.03,"cans_needed":2,"can_size_used":"5 L"}},"responses":{"200":{"description":"Result with values gross_wall_area_m2, gross_wall_area_ft2, paintable_area_m2, paintable_area_ft2, paint_liters, paint_gallons, cans_needed, can_size_used","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/concrete-slab":{"get":{"operationId":"estimate_concrete_slab","tags":["construction"],"summary":"Concrete Slab Calculator","description":"Computes the concrete volume of a rectangular slab, footing or pad from length, width and thickness, adds a waste allowance and converts it to cubic yards, cubic feet and the number of 80 lb, 60 lb and 25 kg bags of premixed concrete.\n\nUse when: You need the amount of ready-mix concrete to order or the number of premix bags for a slab, patio, shed base, footing or pad of uniform thickness.\nDo not use when: The pour is a cylinder such as a post hole or pier (use cylinder for the volume), or you need mortar for brickwork (use brick).\nFormula: volume = length × width × thickness (thickness/100 in m or thickness/12 in ft); with_waste = volume × (1 + waste_percent/100); yd³ = ft³ / 27; m³ = ft³ × 0.028316847; bags_80lb = ceil(ft³ / 0.60); bags_60lb = ceil(ft³ / 0.45); bags_25kg = ceil(m³ × 96).\nDocs: https://tttkmbb.com/construction/concrete-slab.md","parameters":[{"name":"unit_system","in":"query","required":false,"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems. One of: metric, imperial.","schema":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"example":"metric"},{"name":"length","in":"query","required":true,"description":"Slab length in metres or feet. Unit: m or ft.","schema":{"description":"Slab length in metres or feet. Unit: m or ft.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[4],"x-unit":"m or ft"},"example":4},{"name":"width","in":"query","required":true,"description":"Slab width in metres or feet. Unit: m or ft.","schema":{"description":"Slab width in metres or feet. Unit: m or ft.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[3],"x-unit":"m or ft"},"example":3},{"name":"thickness","in":"query","required":true,"description":"Slab thickness in centimetres (metric) or inches (imperial). Typical: 10 cm / 4 in for paths and patios, 15 cm / 6 in for driveways. Unit: cm or in.","schema":{"description":"Slab thickness in centimetres (metric) or inches (imperial). Typical: 10 cm / 4 in for paths and patios, 15 cm / 6 in for driveways. Unit: cm or in.","type":"number","maximum":500,"exclusiveMinimum":0,"examples":[10],"x-unit":"cm or in"},"example":10},{"name":"waste_percent","in":"query","required":false,"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). Covers uneven sub-base, spillage and over-excavation; 5–10 % is usual. Unit: %.","schema":{"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). Covers uneven sub-base, spillage and over-excavation; 5–10 % is usual. Unit: %.","type":"number","minimum":0,"maximum":50,"default":10,"examples":[10],"x-unit":"%"},"example":10}],"x-calculator-id":"concrete-slab","x-outputs":["volume_m3 [m³]","volume_cubic_feet [ft³]","volume_cubic_yards [yd³]","volume_with_waste_m3 [m³]","volume_with_waste_cubic_yards [yd³]","bags_80lb","bags_60lb","bags_25kg"],"x-example":{"inputs":{"unit_system":"imperial","length":10,"width":20,"thickness":4,"waste_percent":10},"expected":{"volume_cubic_feet":66.67,"volume_cubic_yards":2.469,"volume_m3":1.888,"volume_with_waste_cubic_yards":2.716,"volume_with_waste_m3":2.077,"bags_80lb":123,"bags_60lb":163,"bags_25kg":200}},"responses":{"200":{"description":"Result with values volume_m3, volume_cubic_feet, volume_cubic_yards, volume_with_waste_m3, volume_with_waste_cubic_yards, bags_80lb, bags_60lb, bags_25kg","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/tile":{"get":{"operationId":"estimate_tiles_needed","tags":["construction"],"summary":"Tile Calculator","description":"Counts the tiles needed for a floor or wall area from the tile dimensions plus the grout joint width, adds a cutting-waste allowance and converts to boxes when the tiles per box are known.\n\nUse when: You need to order ceramic, porcelain or stone tiles for a known area and tile size, including grout joints and waste.\nDo not use when: You are laying planks or sheet goods sold by area (use flooring), or need the area itself from room dimensions (use rectangle first).\nFormula: footprint = (tile_length + grout_gap) × (tile_width + grout_gap); tiles_no_waste = ceil(area / footprint); tiles = ceil(area / footprint × (1 + waste_percent/100)); boxes = ceil(tiles / tiles_per_box).\nDocs: https://tttkmbb.com/construction/tile.md","parameters":[{"name":"unit_system","in":"query","required":false,"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems. One of: metric, imperial.","schema":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"example":"metric"},{"name":"area","in":"query","required":true,"description":"Floor or wall area to cover, in m² (metric) or ft² (imperial). Unit: m² or ft².","schema":{"description":"Floor or wall area to cover, in m² (metric) or ft² (imperial). Unit: m² or ft².","type":"number","maximum":100000,"exclusiveMinimum":0,"examples":[20],"x-unit":"m² or ft²"},"example":20},{"name":"tile_length","in":"query","required":true,"description":"Tile length in millimetres (metric) or inches (imperial). Unit: mm or in.","schema":{"description":"Tile length in millimetres (metric) or inches (imperial). Unit: mm or in.","type":"number","maximum":5000,"exclusiveMinimum":0,"examples":[300],"x-unit":"mm or in"},"example":300},{"name":"tile_width","in":"query","required":true,"description":"Tile width in millimetres or inches. Unit: mm or in.","schema":{"description":"Tile width in millimetres or inches. Unit: mm or in.","type":"number","maximum":5000,"exclusiveMinimum":0,"examples":[300],"x-unit":"mm or in"},"example":300},{"name":"grout_gap_mm","in":"query","required":false,"description":"Grout joint width in millimetres for both unit systems (3 mm ≈ 1/8 in; 1.6 mm = 1/16 in is the ANSI minimum). Unit: mm.","schema":{"description":"Grout joint width in millimetres for both unit systems (3 mm ≈ 1/8 in; 1.6 mm = 1/16 in is the ANSI minimum). Unit: mm.","type":"number","minimum":0,"maximum":30,"default":3,"examples":[3],"x-unit":"mm"},"example":3},{"name":"waste_percent","in":"query","required":false,"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). 10 % for straight layouts, 15 % for diagonal patterns or rooms with many cuts. Unit: %.","schema":{"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). 10 % for straight layouts, 15 % for diagonal patterns or rooms with many cuts. Unit: %.","type":"number","minimum":0,"maximum":50,"default":10,"examples":[10],"x-unit":"%"},"example":10},{"name":"tiles_per_box","in":"query","required":false,"description":"Number of tiles in one box; optional, enables the box count.","schema":{"description":"Number of tiles in one box; optional, enables the box count.","type":"integer","minimum":1,"maximum":1000,"examples":[10]},"example":10}],"x-calculator-id":"tile","x-outputs":["area_m2 [m²]","area_ft2 [ft²]","tile_footprint_cm2 [cm²]","tile_footprint_in2 [in²]","tiles_needed_no_waste","tiles_needed","boxes_needed"],"x-example":{"inputs":{"unit_system":"metric","area":20,"tile_length":300,"tile_width":300,"grout_gap_mm":3,"waste_percent":10,"tiles_per_box":10},"expected":{"area_m2":20,"tile_footprint_cm2":918.09,"tile_footprint_in2":142.3,"tiles_needed_no_waste":218,"tiles_needed":240,"boxes_needed":24}},"responses":{"200":{"description":"Result with values area_m2, area_ft2, tile_footprint_cm2, tile_footprint_in2, tiles_needed_no_waste, tiles_needed, boxes_needed","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/roof-pitch":{"get":{"operationId":"calculate_roof_pitch","tags":["construction"],"summary":"Roof Pitch Calculator","description":"Converts a roof slope given as rise and run, or as an angle, into the pitch expressed in rise per 12 units of run, the angle in degrees, the slope in percent and the rafter length multiplier (rafter length per unit of horizontal run).\n\nUse when: You need to convert between roof pitch notations (x:12, degrees, percent) or estimate rafter length from the horizontal run.\nDo not use when: You need a general right-triangle solution with all sides (use right-triangle) or a plain angle unit conversion (use angle).\nFormula: pitch_per_12 = 12 × rise / run; angle = atan(rise / run); slope_percent = 100 × rise / run; rafter_multiplier = √(1 + (rise/run)²); rafter_length = horizontal_run_length × rafter_multiplier. From an angle: rise/run = tan(angle).\nDocs: https://tttkmbb.com/construction/roof-pitch.md","parameters":[{"name":"rise","in":"query","required":false,"description":"Vertical rise over the given run (any length unit, same as run). Give rise + run, or angle_degrees.","schema":{"description":"Vertical rise over the given run (any length unit, same as run). Give rise + run, or angle_degrees.","type":"number","minimum":0,"maximum":1000000,"examples":[3]},"example":3},{"name":"run","in":"query","required":false,"description":"Horizontal run over which the rise is measured (same unit as rise). With the default 12, rise is directly the pitch numerator (e.g. 4 → 4:12).","schema":{"description":"Horizontal run over which the rise is measured (same unit as rise). With the default 12, rise is directly the pitch numerator (e.g. 4 → 4:12).","type":"number","maximum":1000000,"exclusiveMinimum":0,"default":12,"examples":[12]},"example":12},{"name":"angle_degrees","in":"query","required":false,"description":"Roof angle from horizontal in degrees; used only when rise is not given. Unit: °.","schema":{"description":"Roof angle from horizontal in degrees; used only when rise is not given. Unit: °.","type":"number","minimum":0,"exclusiveMaximum":90,"examples":[14.04],"x-unit":"°"},"example":14.04},{"name":"horizontal_run_length","in":"query","required":false,"description":"Optional horizontal distance the rafter spans (e.g. half the building width for a gable roof), any unit; returns the rafter length in the same unit (excluding overhang).","schema":{"description":"Optional horizontal distance the rafter spans (e.g. half the building width for a gable roof), any unit; returns the rafter length in the same unit (excluding overhang).","type":"number","exclusiveMinimum":0,"examples":[5]},"example":5}],"x-calculator-id":"roof-pitch","x-outputs":["pitch_per_12","pitch","angle_degrees [°]","slope_percent [%]","rafter_multiplier","rafter_length"],"x-example":{"inputs":{"rise":3,"run":12,"horizontal_run_length":5},"expected":{"pitch_per_12":3,"pitch":"3:12","angle_degrees":14.04,"slope_percent":25,"rafter_multiplier":1.0308,"rafter_length":5.154}},"responses":{"200":{"description":"Result with values pitch_per_12, pitch, angle_degrees, slope_percent, rafter_multiplier, rafter_length","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/stairs":{"get":{"operationId":"calculate_stair_dimensions","tags":["construction"],"summary":"Stair Calculator","description":"Divides a total floor-to-floor rise into equal risers close to a target riser height, derives the tread count, total run, stringer length and stair angle, and checks the result against the IRC residential limits (riser ≤ 7¾ in / 196 mm, tread ≥ 10 in / 254 mm) and the 2R + T comfort rule.\n\nUse when: You are laying out a straight flight of interior or deck stairs and need the number of risers, the exact riser height, the total run and the stringer length.\nDo not use when: The stair has winders, landings or curves (design each straight flight separately), or you need a roof/rafter slope (use roof-pitch).\nFormula: risers = round(total_rise / ideal_riser_height); riser = total_rise / risers; treads = risers − 1; total_run = treads × tread_depth; stringer = √(total_rise² + total_run²); angle = atan(total_rise / total_run); comfort: 63 cm ≤ 2·riser + tread ≤ 65 cm (24–25 in).\nDocs: https://tttkmbb.com/construction/stairs.md","parameters":[{"name":"unit_system","in":"query","required":false,"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems. One of: metric, imperial.","schema":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"example":"metric"},{"name":"total_rise","in":"query","required":true,"description":"Finished-floor to finished-floor height in centimetres (metric) or inches (imperial). Unit: cm or in.","schema":{"description":"Finished-floor to finished-floor height in centimetres (metric) or inches (imperial). Unit: cm or in.","type":"number","maximum":2000,"exclusiveMinimum":0,"examples":[270],"x-unit":"cm or in"},"example":270},{"name":"ideal_riser_height","in":"query","required":false,"description":"Preferred riser height; the riser count is total_rise / this value rounded to the nearest whole number. Default 18 cm (metric) or 7 in (imperial). Unit: cm or in.","schema":{"description":"Preferred riser height; the riser count is total_rise / this value rounded to the nearest whole number. Default 18 cm (metric) or 7 in (imperial). Unit: cm or in.","type":"number","maximum":40,"exclusiveMinimum":0,"examples":[18],"x-unit":"cm or in"},"example":18},{"name":"tread_depth","in":"query","required":false,"description":"Horizontal depth of each tread, nosing to nosing. Default from the comfort rule: 63 cm − 2 × riser (metric) or 25 in − 2 × riser (imperial). Unit: cm or in.","schema":{"description":"Horizontal depth of each tread, nosing to nosing. Default from the comfort rule: 63 cm − 2 × riser (metric) or 25 in − 2 × riser (imperial). Unit: cm or in.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[27],"x-unit":"cm or in"},"example":27}],"x-calculator-id":"stairs","x-outputs":["risers","treads","riser_height_cm [cm]","riser_height_in [in]","tread_depth_cm [cm]","tread_depth_in [in]","total_run_cm [cm]","total_run_in [in]","stringer_length_cm [cm]","stringer_length_in [in]","stair_angle_degrees [°]","comfort_check","code_check"],"x-example":{"inputs":{"unit_system":"imperial","total_rise":106,"ideal_riser_height":7,"tread_depth":10.5},"expected":{"risers":15,"treads":14,"riser_height_in":7.067,"riser_height_cm":17.95,"total_run_in":147,"stringer_length_in":181.23,"stair_angle_degrees":35.8,"comfort_check":"2R + T = 24.63 in: within the 24–25 in comfort range","code_check":"Meets IRC R311.7.5 (riser 7.07 in ≤ 7.75 in, tread 10.5 in ≥ 10 in)"}},"responses":{"200":{"description":"Result with values risers, treads, riser_height_cm, riser_height_in, tread_depth_cm, tread_depth_in, total_run_cm, total_run_in, stringer_length_cm, stringer_length_in, stair_angle_degrees, comfort_check, code_check","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/wallpaper":{"get":{"operationId":"estimate_wallpaper_rolls","tags":["construction"],"summary":"Wallpaper Calculator","description":"Estimates wallpaper rolls by the strip method: the strip length is the wall height plus 10 cm trim, rounded up to a whole pattern repeat; whole strips per roll are counted, door and window areas are deducted and the strips are converted to rolls.\n\nUse when: You need to know how many rolls of wallpaper to buy for a room from its perimeter (or wall area), height and the roll dimensions, with or without a pattern repeat.\nDo not use when: You are painting (use paint) or boarding (use drywall) the walls, or the paper is a mural sold by the panel.\nFormula: strip = wall_height + 0.10 m, rounded up to a multiple of pattern_repeat; strips_per_roll = floor(roll_length / strip); net_area = perimeter × height − 1.9 m² × doors − 1.4 m² × windows; strips_needed = ceil(net_area / (roll_width × wall_height)); rolls = ceil(strips_needed / strips_per_roll).\nDocs: https://tttkmbb.com/construction/wallpaper.md","parameters":[{"name":"unit_system","in":"query","required":false,"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems. One of: metric, imperial.","schema":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"example":"metric"},{"name":"room_perimeter","in":"query","required":false,"description":"Total length of the walls to paper (m or ft), e.g. 2 × (length + width). Alternatively give wall_area. Unit: m or ft.","schema":{"description":"Total length of the walls to paper (m or ft), e.g. 2 × (length + width). Alternatively give wall_area. Unit: m or ft.","type":"number","maximum":10000,"exclusiveMinimum":0,"examples":[16],"x-unit":"m or ft"},"example":16},{"name":"wall_height","in":"query","required":true,"description":"Height to paper (m or ft); 10 cm (4 in) is added per strip for trimming. Unit: m or ft.","schema":{"description":"Height to paper (m or ft); 10 cm (4 in) is added per strip for trimming. Unit: m or ft.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[2.4],"x-unit":"m or ft"},"example":2.4},{"name":"wall_area","in":"query","required":false,"description":"Gross wall area before openings (m² or ft²); used instead of room_perimeter × wall_height when given. Unit: m² or ft².","schema":{"description":"Gross wall area before openings (m² or ft²); used instead of room_perimeter × wall_height when given. Unit: m² or ft².","type":"number","exclusiveMinimum":0,"x-unit":"m² or ft²"}},{"name":"doors","in":"query","required":false,"description":"Number of doors; 1.9 m² (20.5 ft²) is deducted per door.","schema":{"description":"Number of doors; 1.9 m² (20.5 ft²) is deducted per door.","type":"integer","minimum":0,"maximum":100,"default":1,"examples":[1]},"example":1},{"name":"windows","in":"query","required":false,"description":"Number of windows; 1.4 m² (15.1 ft²) is deducted per window.","schema":{"description":"Number of windows; 1.4 m² (15.1 ft²) is deducted per window.","type":"integer","minimum":0,"maximum":100,"default":1,"examples":[1]},"example":1},{"name":"roll_width","in":"query","required":false,"description":"Roll width. Default 0.53 m (metric, European roll) or 2.25 ft = 27 in (imperial, American roll). Unit: m or ft.","schema":{"description":"Roll width. Default 0.53 m (metric, European roll) or 2.25 ft = 27 in (imperial, American roll). Unit: m or ft.","type":"number","maximum":10,"exclusiveMinimum":0,"examples":[0.53],"x-unit":"m or ft"},"example":0.53},{"name":"roll_length","in":"query","required":false,"description":"Roll length. Default 10.05 m (metric) or 27 ft (imperial). Unit: m or ft.","schema":{"description":"Roll length. Default 10.05 m (metric) or 27 ft (imperial). Unit: m or ft.","type":"number","maximum":200,"exclusiveMinimum":0,"examples":[10.05],"x-unit":"m or ft"},"example":10.05},{"name":"pattern_repeat","in":"query","required":false,"description":"Vertical pattern repeat printed on the label (cm or in); 0 for plain or free-match paper. Each strip is rounded up to a whole number of repeats. Unit: cm or in.","schema":{"description":"Vertical pattern repeat printed on the label (cm or in); 0 for plain or free-match paper. Each strip is rounded up to a whole number of repeats. Unit: cm or in.","type":"number","minimum":0,"maximum":500,"default":0,"examples":[0],"x-unit":"cm or in"},"example":0}],"x-calculator-id":"wallpaper","x-outputs":["gross_wall_area_m2 [m²]","net_wall_area_m2 [m²]","strip_length_m [m]","strip_length_ft [ft]","strips_per_roll","strips_needed","rolls_needed","roll_size_used"],"x-example":{"inputs":{"unit_system":"metric","room_perimeter":16,"wall_height":2.4,"doors":1,"windows":1},"expected":{"gross_wall_area_m2":38.4,"net_wall_area_m2":35.1,"strip_length_m":2.5,"strips_per_roll":4,"strips_needed":28,"rolls_needed":7,"roll_size_used":"0.53 m × 10.05 m"}},"responses":{"200":{"description":"Result with values gross_wall_area_m2, net_wall_area_m2, strip_length_m, strip_length_ft, strips_per_roll, strips_needed, rolls_needed, roll_size_used","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/gravel":{"get":{"operationId":"estimate_gravel_volume","tags":["construction"],"summary":"Gravel Calculator","description":"Computes the volume of loose aggregate needed to cover an area to a given depth and converts it to weight with a typical bulk density for gravel, crushed stone, sand, topsoil or mulch (or a custom density).\n\nUse when: You need to order gravel, crushed stone, sand, topsoil or bark mulch by volume (m³, yd³) or by weight (tonnes, US tons) for a driveway, path, bed or sub-base.\nDo not use when: The material is concrete (use concrete-slab) or you need the density of a specific product: use the supplier's figure via material = custom and density_t_per_m3.\nFormula: area = length × width (or area); volume_m³ = area_m² × depth_m; yd³ = m³ / 0.764555; tonnes = m³ × density_t_per_m³; short tons = tonnes × 1.10231. Densities: gravel 1.6, crushed stone 1.6, sand 1.5, topsoil 1.2, mulch 0.4 t/m³.\nDocs: https://tttkmbb.com/construction/gravel.md","parameters":[{"name":"unit_system","in":"query","required":false,"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems. One of: metric, imperial.","schema":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"example":"metric"},{"name":"length","in":"query","required":false,"description":"Length of the area (m or ft). Give length and width, or area. Unit: m or ft.","schema":{"description":"Length of the area (m or ft). Give length and width, or area. Unit: m or ft.","type":"number","maximum":10000,"exclusiveMinimum":0,"examples":[10],"x-unit":"m or ft"},"example":10},{"name":"width","in":"query","required":false,"description":"Width of the area (m or ft). Unit: m or ft.","schema":{"description":"Width of the area (m or ft). Unit: m or ft.","type":"number","maximum":10000,"exclusiveMinimum":0,"examples":[5],"x-unit":"m or ft"},"example":5},{"name":"area","in":"query","required":false,"description":"Area to cover (m² or ft²); used instead of length × width when given. Unit: m² or ft².","schema":{"description":"Area to cover (m² or ft²); used instead of length × width when given. Unit: m² or ft².","type":"number","exclusiveMinimum":0,"x-unit":"m² or ft²"}},{"name":"depth","in":"query","required":true,"description":"Depth of the layer in centimetres (metric) or inches (imperial). Typical: 5 cm / 2 in decorative gravel, 10–15 cm / 4–6 in driveway base, 7.5 cm / 3 in mulch. Unit: cm or in.","schema":{"description":"Depth of the layer in centimetres (metric) or inches (imperial). Typical: 5 cm / 2 in decorative gravel, 10–15 cm / 4–6 in driveway base, 7.5 cm / 3 in mulch. Unit: cm or in.","type":"number","maximum":500,"exclusiveMinimum":0,"examples":[5],"x-unit":"cm or in"},"example":5},{"name":"material","in":"query","required":false,"description":"Selects a typical loose bulk density in tonnes per cubic metre. One of: gravel, crushed_stone, sand, topsoil, mulch, custom.","schema":{"description":"Selects a typical loose bulk density in tonnes per cubic metre.","type":"string","enum":["gravel","crushed_stone","sand","topsoil","mulch","custom"],"default":"gravel","examples":["gravel"]},"example":"gravel"},{"name":"density_t_per_m3","in":"query","required":false,"description":"Bulk density in tonnes per m³ (= kg/L); required for material = custom and overrides the preset otherwise. Unit: t/m³.","schema":{"description":"Bulk density in tonnes per m³ (= kg/L); required for material = custom and overrides the preset otherwise. Unit: t/m³.","type":"number","maximum":10,"exclusiveMinimum":0,"examples":[1.6],"x-unit":"t/m³"},"example":1.6}],"x-calculator-id":"gravel","x-outputs":["area_m2 [m²]","volume_m3 [m³]","volume_cubic_yards [yd³]","volume_cubic_feet [ft³]","density_used_t_per_m3 [t/m³]","weight_tonnes [t]","weight_kg [kg]","weight_us_tons [US short tons]"],"x-example":{"inputs":{"unit_system":"metric","length":10,"width":5,"depth":5,"material":"gravel"},"expected":{"area_m2":50,"volume_m3":2.5,"volume_cubic_yards":3.27,"volume_cubic_feet":88.29,"density_used_t_per_m3":1.6,"weight_tonnes":4,"weight_kg":4000,"weight_us_tons":4.409}},"responses":{"200":{"description":"Result with values area_m2, volume_m3, volume_cubic_yards, volume_cubic_feet, density_used_t_per_m3, weight_tonnes, weight_kg, weight_us_tons","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/drywall":{"get":{"operationId":"estimate_drywall_sheets","tags":["construction"],"summary":"Drywall Calculator","description":"Estimates the number of gypsum board sheets for walls (and optionally the ceiling) of a room with a waste allowance, plus screws at about one per square foot and joint compound at the USG rate of 10 gallons per 1,000 ft² of board.\n\nUse when: You need to order plasterboard/drywall sheets, screws and joint compound for a room or a known wall area.\nDo not use when: You need paint or wallpaper quantities for the finished wall (use paint or wallpaper), or metal-stud framing take-offs.\nFormula: area = 2 × (room_length + room_width) × wall_height (or wall_area) + room_length × room_width (if include_ceiling) − openings_area; sheets = ceil(area × (1 + waste/100) / sheet_area); screws ≈ area_ft² × 1; compound_gal = area_ft² / 100; pails = ceil(compound_gal / 4.5).\nDocs: https://tttkmbb.com/construction/drywall.md","parameters":[{"name":"unit_system","in":"query","required":false,"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems. One of: metric, imperial.","schema":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"example":"metric"},{"name":"room_length","in":"query","required":false,"description":"Room length (m or ft); used with room_width and wall_height when wall_area is not given, and for the ceiling. Unit: m or ft.","schema":{"description":"Room length (m or ft); used with room_width and wall_height when wall_area is not given, and for the ceiling. Unit: m or ft.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[5],"x-unit":"m or ft"},"example":5},{"name":"room_width","in":"query","required":false,"description":"Room width (m or ft). Unit: m or ft.","schema":{"description":"Room width (m or ft). Unit: m or ft.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[4],"x-unit":"m or ft"},"example":4},{"name":"wall_height","in":"query","required":false,"description":"Wall height (m or ft). Unit: m or ft.","schema":{"description":"Wall height (m or ft). Unit: m or ft.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[2.4],"x-unit":"m or ft"},"example":2.4},{"name":"wall_area","in":"query","required":false,"description":"Total wall area to board (m² or ft²); replaces 2 × (length + width) × height when given. Unit: m² or ft².","schema":{"description":"Total wall area to board (m² or ft²); replaces 2 × (length + width) × height when given. Unit: m² or ft².","type":"number","exclusiveMinimum":0,"x-unit":"m² or ft²"}},{"name":"include_ceiling","in":"query","required":false,"description":"Add the ceiling area (room_length × room_width).","schema":{"description":"Add the ceiling area (room_length × room_width).","type":"boolean","default":false,"examples":[false]},"example":false},{"name":"openings_area","in":"query","required":false,"description":"Area of large openings (doors, windows) to deduct; small openings are usually not deducted because the cut-outs are waste. Unit: m² or ft².","schema":{"description":"Area of large openings (doors, windows) to deduct; small openings are usually not deducted because the cut-outs are waste. Unit: m² or ft².","type":"number","minimum":0,"default":0,"examples":[0],"x-unit":"m² or ft²"},"example":0},{"name":"sheet_size","in":"query","required":false,"description":"Board size. Default 1200 × 2400 mm (metric) or 4 × 8 ft (imperial). One of: 4x8_ft, 4x12_ft, 1200x2400_mm, 1200x3000_mm.","schema":{"description":"Board size. Default 1200 × 2400 mm (metric) or 4 × 8 ft (imperial).","type":"string","enum":["4x8_ft","4x12_ft","1200x2400_mm","1200x3000_mm"],"examples":["1200x2400_mm"]},"example":"1200x2400_mm"},{"name":"waste_percent","in":"query","required":false,"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). 10 % is typical for rooms with few openings; use 15 % for complex rooms. Unit: %.","schema":{"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). 10 % is typical for rooms with few openings; use 15 % for complex rooms. Unit: %.","type":"number","minimum":0,"maximum":50,"default":10,"examples":[10],"x-unit":"%"},"example":10}],"x-calculator-id":"drywall","x-outputs":["area_m2 [m²]","area_ft2 [ft²]","sheets_needed","sheet_size_used","screws","joint_compound_liters [L]","joint_compound_gallons [US gal]","compound_pails_4_5_gal"],"x-example":{"inputs":{"unit_system":"imperial","room_length":15,"room_width":12,"wall_height":8,"include_ceiling":true,"sheet_size":"4x8_ft","waste_percent":10},"expected":{"area_ft2":612,"area_m2":56.86,"sheets_needed":22,"sheet_size_used":"4 × 8 ft","screws":612,"joint_compound_gallons":6.12,"joint_compound_liters":23.2,"compound_pails_4_5_gal":2}},"responses":{"200":{"description":"Result with values area_m2, area_ft2, sheets_needed, sheet_size_used, screws, joint_compound_liters, joint_compound_gallons, compound_pails_4_5_gal","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/fence":{"get":{"operationId":"estimate_fence_materials","tags":["construction"],"summary":"Fence Calculator","description":"Estimates the posts, rails and pickets for a straight run of wooden fence from the total length, the maximum post spacing, the number and width of gates, the rails per section and the picket width plus gap.\n\nUse when: You need a material list (posts, rails, pickets) for a picket, privacy or post-and-rail fence of a known length.\nDo not use when: You need concrete for the post holes (use cylinder for the hole volume and concrete-slab for bags), or the fence is chain-link or panel fencing sold per panel (divide the length by the panel width instead).\nFormula: fence_length = total_length − gates × gate_width; sections = ceil(fence_length / post_spacing); posts = sections + gates + 1; actual_spacing = fence_length / sections; rails = sections × rails_per_section; pickets = ceil(fence_length / (picket_width + picket_gap)).\nDocs: https://tttkmbb.com/construction/fence.md","parameters":[{"name":"unit_system","in":"query","required":false,"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems. One of: metric, imperial.","schema":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"example":"metric"},{"name":"total_length","in":"query","required":true,"description":"Overall length of the fence line including gate openings (m or ft). Unit: m or ft.","schema":{"description":"Overall length of the fence line including gate openings (m or ft). Unit: m or ft.","type":"number","maximum":100000,"exclusiveMinimum":0,"examples":[30],"x-unit":"m or ft"},"example":30},{"name":"post_spacing","in":"query","required":false,"description":"Maximum centre-to-centre distance between posts; sections are spaced evenly at or below this. Default 2.4 m (metric) or 8 ft (imperial). Unit: m or ft.","schema":{"description":"Maximum centre-to-centre distance between posts; sections are spaced evenly at or below this. Default 2.4 m (metric) or 8 ft (imperial). Unit: m or ft.","type":"number","maximum":20,"exclusiveMinimum":0,"examples":[2.4],"x-unit":"m or ft"},"example":2.4},{"name":"gates","in":"query","required":false,"description":"Number of gate openings in the run; each takes a bay between two posts.","schema":{"description":"Number of gate openings in the run; each takes a bay between two posts.","type":"integer","minimum":0,"maximum":50,"default":0,"examples":[0]},"example":0},{"name":"gate_width","in":"query","required":false,"description":"Width of each gate opening. Default 1 m (metric) or 3 ft (imperial). Unit: m or ft.","schema":{"description":"Width of each gate opening. Default 1 m (metric) or 3 ft (imperial). Unit: m or ft.","type":"number","maximum":10,"exclusiveMinimum":0,"examples":[1],"x-unit":"m or ft"},"example":1},{"name":"rails_per_section","in":"query","required":false,"description":"Horizontal rails between each pair of posts: 2 for fences up to about 1.2 m / 4 ft, 3 for 1.8 m / 6 ft privacy fences.","schema":{"description":"Horizontal rails between each pair of posts: 2 for fences up to about 1.2 m / 4 ft, 3 for 1.8 m / 6 ft privacy fences.","type":"integer","minimum":1,"maximum":5,"default":2,"examples":[3]},"example":3},{"name":"picket_width","in":"query","required":false,"description":"Width of one picket/board in millimetres (metric) or inches (imperial). Optional; enables the picket count. Unit: mm or in.","schema":{"description":"Width of one picket/board in millimetres (metric) or inches (imperial). Optional; enables the picket count. Unit: mm or in.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[90],"x-unit":"mm or in"},"example":90},{"name":"picket_gap","in":"query","required":false,"description":"Gap between pickets (0 for a solid privacy fence), in mm or in. Unit: mm or in.","schema":{"description":"Gap between pickets (0 for a solid privacy fence), in mm or in. Unit: mm or in.","type":"number","minimum":0,"maximum":1000,"default":0,"examples":[10],"x-unit":"mm or in"},"example":10}],"x-calculator-id":"fence","x-outputs":["fence_length_m [m]","fence_length_ft [ft]","sections","posts","actual_post_spacing_m [m]","actual_post_spacing_ft [ft]","rails","pickets"],"x-example":{"inputs":{"unit_system":"imperial","total_length":100,"post_spacing":8,"gates":1,"gate_width":4,"rails_per_section":2,"picket_width":5.5,"picket_gap":0.5},"expected":{"fence_length_ft":96,"fence_length_m":29.26,"sections":12,"posts":14,"actual_post_spacing_ft":8,"rails":24,"pickets":192}},"responses":{"200":{"description":"Result with values fence_length_m, fence_length_ft, sections, posts, actual_post_spacing_m, actual_post_spacing_ft, rails, pickets","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/decking":{"get":{"operationId":"estimate_decking_materials","tags":["construction"],"summary":"Decking Calculator","description":"Estimates the number of deck boards (rows of boards across the width, board lengths along the length, plus waste), the joists at a given spacing and the screws at two per board per joist for a rectangular deck.\n\nUse when: You need a material list for a rectangular timber or composite deck: boards, joists and fasteners.\nDo not use when: You need structural sizing of joists and beams (span tables depend on species, grade and load; see the AWC DCA 6 guide) or stairs to the deck (use stairs).\nFormula: rows = ceil(deck_width / (board_width + board_gap)); linear = rows × deck_length; boards = ceil(linear × (1 + waste/100) / board_length); joists = floor(deck_length / joist_spacing) + 1; screws = rows × joists × 2.\nDocs: https://tttkmbb.com/construction/decking.md","parameters":[{"name":"unit_system","in":"query","required":false,"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems. One of: metric, imperial.","schema":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"example":"metric"},{"name":"deck_length","in":"query","required":true,"description":"Deck dimension parallel to the boards (m or ft). Joists run across this direction. Unit: m or ft.","schema":{"description":"Deck dimension parallel to the boards (m or ft). Joists run across this direction. Unit: m or ft.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[4],"x-unit":"m or ft"},"example":4},{"name":"deck_width","in":"query","required":true,"description":"Deck dimension across the boards (m or ft); equals the joist length. Unit: m or ft.","schema":{"description":"Deck dimension across the boards (m or ft); equals the joist length. Unit: m or ft.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[3],"x-unit":"m or ft"},"example":3},{"name":"board_width","in":"query","required":false,"description":"Actual face width of one board. Default 140 mm (metric) or 5.5 in (imperial, a nominal 2 × 6 or 5/4 × 6). Unit: mm or in.","schema":{"description":"Actual face width of one board. Default 140 mm (metric) or 5.5 in (imperial, a nominal 2 × 6 or 5/4 × 6). Unit: mm or in.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[140],"x-unit":"mm or in"},"example":140},{"name":"board_gap","in":"query","required":false,"description":"Drainage gap between boards. Default 5 mm (metric) or 3/16 in = 0.1875 in (imperial). Unit: mm or in.","schema":{"description":"Drainage gap between boards. Default 5 mm (metric) or 3/16 in = 0.1875 in (imperial). Unit: mm or in.","type":"number","minimum":0,"maximum":100,"examples":[5],"x-unit":"mm or in"},"example":5},{"name":"board_length","in":"query","required":false,"description":"Length of the boards you will buy. Default 3.6 m (metric) or 12 ft (imperial). Unit: m or ft.","schema":{"description":"Length of the boards you will buy. Default 3.6 m (metric) or 12 ft (imperial). Unit: m or ft.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[3.6],"x-unit":"m or ft"},"example":3.6},{"name":"joist_spacing","in":"query","required":false,"description":"Centre-to-centre joist spacing. Default 400 mm (metric) or 16 in (imperial); composite boards laid diagonally usually need 300 mm / 12 in. Unit: mm or in.","schema":{"description":"Centre-to-centre joist spacing. Default 400 mm (metric) or 16 in (imperial); composite boards laid diagonally usually need 300 mm / 12 in. Unit: mm or in.","type":"number","maximum":2000,"exclusiveMinimum":0,"examples":[400],"x-unit":"mm or in"},"example":400},{"name":"waste_percent","in":"query","required":false,"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). 5 % for straight decking; 10–15 % for diagonal or picture-frame patterns. Unit: %.","schema":{"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). 5 % for straight decking; 10–15 % for diagonal or picture-frame patterns. Unit: %.","type":"number","minimum":0,"maximum":50,"default":5,"examples":[5],"x-unit":"%"},"example":5}],"x-calculator-id":"decking","x-outputs":["area_m2 [m²]","area_ft2 [ft²]","board_rows","linear_length_m [m]","linear_length_ft [ft]","boards_needed","joists","screws"],"x-example":{"inputs":{"unit_system":"metric","deck_length":4,"deck_width":3,"board_width":140,"board_gap":5,"board_length":3.6,"joist_spacing":400,"waste_percent":5},"expected":{"area_m2":12,"area_ft2":129.17,"board_rows":21,"linear_length_m":84,"boards_needed":25,"joists":11,"screws":462}},"responses":{"200":{"description":"Result with values area_m2, area_ft2, board_rows, linear_length_m, linear_length_ft, boards_needed, joists, screws","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/board-feet":{"get":{"operationId":"calculate_board_feet","tags":["construction"],"summary":"Board Feet Calculator","description":"Computes board feet (the US lumber volume unit: 1 board foot = 144 cubic inches = a 1 in × 12 in × 12 in board) from nominal thickness and width in inches and length in feet, for a given quantity, with the total cost at a price per board foot.\n\nUse when: You are pricing or ordering hardwood or rough lumber sold by the board foot, or converting lumber dimensions into board feet, cubic feet or cubic metres.\nDo not use when: Lumber is sold by the linear foot or piece (dimensional softwood such as 2 × 4 studs), or you need deck board counts (use decking).\nFormula: board_feet = thickness_in × width_in × length_ft / 12 (equivalently T × W × L_in / 144); total = board_feet × quantity; cost = total × price_per_board_foot; ft³ = board_feet / 12; m³ = ft³ × 0.028316847.\nDocs: https://tttkmbb.com/construction/board-feet.md","parameters":[{"name":"thickness_in","in":"query","required":true,"description":"Nominal thickness in inches (hardwood is often quoted in quarters: 4/4 = 1 in, 8/4 = 2 in). Unit: in.","schema":{"description":"Nominal thickness in inches (hardwood is often quoted in quarters: 4/4 = 1 in, 8/4 = 2 in). Unit: in.","type":"number","maximum":48,"exclusiveMinimum":0,"examples":[1],"x-unit":"in"},"example":1},{"name":"width_in","in":"query","required":true,"description":"Nominal width in inches. Unit: in.","schema":{"description":"Nominal width in inches. Unit: in.","type":"number","maximum":120,"exclusiveMinimum":0,"examples":[6],"x-unit":"in"},"example":6},{"name":"length_ft","in":"query","required":true,"description":"Length in feet. Unit: ft.","schema":{"description":"Length in feet. Unit: ft.","type":"number","maximum":200,"exclusiveMinimum":0,"examples":[8],"x-unit":"ft"},"example":8},{"name":"quantity","in":"query","required":false,"description":"Number of identical pieces.","schema":{"description":"Number of identical pieces.","type":"integer","minimum":1,"maximum":100000,"default":1,"examples":[10]},"example":10},{"name":"price_per_board_foot","in":"query","required":false,"description":"Optional unit price; enables the total cost.","schema":{"description":"Optional unit price; enables the total cost.","type":"number","minimum":0,"examples":[5]},"example":5}],"x-calculator-id":"board-feet","x-outputs":["board_feet_each [bd ft]","board_feet_total [bd ft]","total_cost","volume_cubic_feet [ft³]","volume_m3 [m³]"],"x-example":{"inputs":{"thickness_in":1,"width_in":6,"length_ft":8,"quantity":10,"price_per_board_foot":5},"expected":{"board_feet_each":4,"board_feet_total":40,"total_cost":200,"volume_cubic_feet":3.3333,"volume_m3":0.09439}},"responses":{"200":{"description":"Result with values board_feet_each, board_feet_total, total_cost, volume_cubic_feet, volume_m3","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/calculate/brick":{"get":{"operationId":"estimate_bricks_needed","tags":["construction"],"summary":"Brick Calculator","description":"Counts the bricks in a single-leaf (half-brick, stretcher-bond) wall from its length and height using a standard brick size with its mortar joint, adds waste, and estimates the mortar volume geometrically and the bags of mortar mix from a manufacturer rule of thumb.\n\nUse when: You need the number of bricks and the mortar for a garden wall, veneer or single-skin wall of known face area.\nDo not use when: The wall is concrete block (use the block face 440 × 215 mm or 8 × 16 in as a custom brick) or two leaves thick: double the brick count, or use concrete-slab for footings.\nFormula: bricks_per_m² = 1 / ((L + j) × (H + j)); bricks = ceil(wall_area × bricks_per_m² × (1 + waste/100)); mortar_m³ = wall_area × W − wall_area × bricks_per_m² × L × W × H; bags_80lb = ceil(bricks / 37); bags_25kg = ceil(bricks / 25). US modular uses the nominal 8 × 2⅔ in course module (3 courses = 8 in).\nDocs: https://tttkmbb.com/construction/brick.md","parameters":[{"name":"unit_system","in":"query","required":false,"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems. One of: metric, imperial.","schema":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"example":"metric"},{"name":"wall_length","in":"query","required":true,"description":"Length of the wall face (m or ft). Unit: m or ft.","schema":{"description":"Length of the wall face (m or ft). Unit: m or ft.","type":"number","maximum":10000,"exclusiveMinimum":0,"examples":[6],"x-unit":"m or ft"},"example":6},{"name":"wall_height","in":"query","required":true,"description":"Height of the wall face (m or ft). Unit: m or ft.","schema":{"description":"Height of the wall face (m or ft). Unit: m or ft.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[2.4],"x-unit":"m or ft"},"example":2.4},{"name":"brick_size","in":"query","required":false,"description":"Brick format. Default uk_standard (metric) or us_modular (imperial). One of: us_modular, uk_standard, au_standard, de_nf, metric_modular, custom.","schema":{"description":"Brick format. Default uk_standard (metric) or us_modular (imperial).","type":"string","enum":["us_modular","uk_standard","au_standard","de_nf","metric_modular","custom"],"examples":["uk_standard"]},"example":"uk_standard"},{"name":"brick_length","in":"query","required":false,"description":"Brick length for brick_size = custom (mm or in). Unit: mm or in.","schema":{"description":"Brick length for brick_size = custom (mm or in). Unit: mm or in.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[215],"x-unit":"mm or in"},"example":215},{"name":"brick_height","in":"query","required":false,"description":"Brick height for custom (mm or in). Unit: mm or in.","schema":{"description":"Brick height for custom (mm or in). Unit: mm or in.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[65],"x-unit":"mm or in"},"example":65},{"name":"brick_width","in":"query","required":false,"description":"Brick width (wall thickness) for custom, used for the mortar volume (mm or in). Unit: mm or in.","schema":{"description":"Brick width (wall thickness) for custom, used for the mortar volume (mm or in). Unit: mm or in.","type":"number","maximum":1000,"exclusiveMinimum":0,"examples":[102.5],"x-unit":"mm or in"},"example":102.5},{"name":"mortar_joint","in":"query","required":false,"description":"Joint thickness for custom bricks. Default 10 mm (metric) or 3/8 in (imperial). Unit: mm or in.","schema":{"description":"Joint thickness for custom bricks. Default 10 mm (metric) or 3/8 in (imperial). Unit: mm or in.","type":"number","minimum":0,"maximum":50,"examples":[10],"x-unit":"mm or in"},"example":10},{"name":"waste_percent","in":"query","required":false,"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). 5 % covers cut and broken bricks on plain walls; 10 % for walls with many openings or corners. Unit: %.","schema":{"description":"Extra material for cuts, breakage and offcuts, applied as a multiplier (1 + waste_percent/100). 5 % covers cut and broken bricks on plain walls; 10 % for walls with many openings or corners. Unit: %.","type":"number","minimum":0,"maximum":50,"default":5,"examples":[5],"x-unit":"%"},"example":5}],"x-calculator-id":"brick","x-outputs":["wall_area_m2 [m²]","wall_area_ft2 [ft²]","bricks_per_m2","bricks_per_ft2","bricks_needed_no_waste","bricks_needed","mortar_volume_m3 [m³]","mortar_volume_cubic_feet [ft³]","mortar_bags_80lb","mortar_bags_25kg"],"x-example":{"inputs":{"unit_system":"imperial","wall_length":20,"wall_height":8,"brick_size":"us_modular","waste_percent":5},"expected":{"wall_area_ft2":160,"wall_area_m2":14.86,"bricks_per_ft2":6.75,"bricks_per_m2":72.66,"bricks_needed_no_waste":1080,"bricks_needed":1134,"mortar_volume_cubic_feet":9.46,"mortar_volume_m3":0.268,"mortar_bags_80lb":30,"mortar_bags_25kg":44}},"responses":{"200":{"description":"Result with values wall_area_m2, wall_area_ft2, bricks_per_m2, bricks_per_ft2, bricks_needed_no_waste, bricks_needed, mortar_volume_m3, mortar_volume_cubic_feet, mortar_bags_80lb, mortar_bags_25kg","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute per client IP.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Approximate remaining requests in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time (seconds) when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultEnvelope"}}}},"400":{"description":"Missing parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error (OUT_OF_RANGE, INVALID_PARAMETER, CALCULATION_ERROR …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}},"components":{"securitySchemes":{},"schemas":{"ErrorObject":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["MISSING_PARAMETER","INVALID_JSON","INVALID_REQUEST","INVALID_PARAMETER","OUT_OF_RANGE","INVALID_ENUM_VALUE","INVALID_DATE","INVALID_LIST","UNKNOWN_UNIT","CALCULATION_ERROR","UNKNOWN_CALCULATOR","NOT_FOUND","METHOD_NOT_ALLOWED","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"},"field":{"type":"string"},"hint":{"type":"string"},"retryable":{"type":"boolean"},"retry_after_seconds":{"type":"integer"}}},"ErrorEnvelope":{"type":"object","required":["success","error","timestamp"],"properties":{"success":{"type":"boolean","const":false},"version":{"type":"string"},"error":{"$ref":"#/components/schemas/ErrorObject"},"request":{"type":"object"},"timestamp":{"type":"string","format":"date-time"},"links":{"type":"object"}}},"Source":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"type":{"type":"string"},"retrieved_at":{"type":"string"}}},"NextAction":{"type":"object","properties":{"tool":{"type":"string"},"calculator_id":{"type":"string"},"reason":{"type":"string"},"url":{"type":"string"},"docs":{"type":"string"}}},"ResultEnvelope":{"type":"object","required":["success","request","result","timestamp"],"properties":{"success":{"type":"boolean","const":true},"version":{"type":"string"},"request":{"type":"object","properties":{"tool":{"type":"string"},"calculator_id":{"type":"string"},"inputs":{"type":"object"},"request_id":{"type":"string"},"received_at":{"type":"string","format":"date-time"}}},"result":{"type":"object","properties":{"entity_type":{"type":"string","const":"calculation"},"id":{"type":"string"},"calculator_id":{"type":"string"},"calculator_name":{"type":"string"},"category":{"type":"string"},"status":{"type":"string","enum":["completed"]},"values":{"type":"object","additionalProperties":true},"units":{"type":"object","additionalProperties":{"type":"string"}},"formula":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"}}},"warnings":{"type":"array","items":{"type":"object"}},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"freshness":{"type":"object","properties":{"type":{"type":"string","enum":["static","daily","real_time"]},"max_age_seconds":{"type":["integer","null"]},"note":{"type":"string"}}},"cache":{"type":"object","properties":{"hit":{"type":"boolean"},"cacheable":{"type":"boolean"},"deterministic":{"type":"boolean"}}},"timestamp":{"type":"string","format":"date-time"},"duration_ms":{"type":"number"},"next_actions":{"type":"array","items":{"$ref":"#/components/schemas/NextAction"}},"links":{"type":"object","additionalProperties":{"type":"string"}}}},"ListEnvelope":{"type":"object","properties":{"success":{"type":"boolean"},"version":{"type":"string"},"request":{"type":"object"},"result":{"type":"object","properties":{"entity_type":{"type":"string"},"status":{"type":"string"},"count":{"type":"integer"},"calculators":{"type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"object"}},"quantities":{"type":"array","items":{"type":"object"}}}},"timestamp":{"type":"string","format":"date-time"},"next_actions":{"type":"array","items":{"$ref":"#/components/schemas/NextAction"}},"links":{"type":"object"}}},"SchemaEnvelope":{"type":"object","properties":{"success":{"type":"boolean"},"result":{"type":"object","description":"Calculator definition: inputs, outputs, formula, sources, freshness, examples, faq, related, input_schema, output_schema."},"timestamp":{"type":"string","format":"date-time"}}},"TaskEnvelope":{"type":"object","properties":{"success":{"type":"boolean"},"task":{"type":"object","properties":{"task_id":{"type":"string"},"status":{"type":"string","enum":["pending","processing","completed","failed","cancelled"]},"created_at":{"type":"string"},"completed_at":{"type":"string"},"result":{"type":"object"}}},"timestamp":{"type":"string","format":"date-time"}}}},"responses":{"RateLimited":{"description":"Rate limited: retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"x-mcp":{"url":"https://tttkmbb.com/mcp","transport":"streamable-http","tools":["search_calculators","list_calculators","list_calculator_categories","get_calculator_schema","run_calculator","convert_units","list_units","calculate_compound_interest","calculate_loan_payment","calculate_mortgage_payment","calculate_tip","calculate_bmi","calculate_bmr","calculate_tdee","calculate_running_pace","calculate_percentage","calculate_percentage_change","solve_quadratic_equation","calculate_circle_properties","calculate_descriptive_statistics","convert_temperature","calculate_kinetic_energy","solve_ohms_law","calculate_molar_mass","calculate_age","calculate_date_difference"]},"x-a2a":{"agent_card":"https://tttkmbb.com/.well-known/agent-card.json","url":"https://tttkmbb.com/a2a"},"x-llms-txt":"https://tttkmbb.com/llms.txt","x-ard":"https://tttkmbb.com/.well-known/ard.json","x-rate-limit":{"requests_per_minute_per_ip":600,"headers":["X-RateLimit-Limit","X-RateLimit-Remaining","X-RateLimit-Reset"],"on_exceed":"HTTP 429 with Retry-After"}}