CalculationTime

CalculationTime API

Ask a time, date or calculation question with one web address. Receive a structured answer your code can use. No key or sign-up.

Your answer

What the API sends back

Choose a table or a request in the console and press =. The full reply lands here, exactly as your own code would receive it, with the same request ready to copy as curl, Python or JavaScript.

The short version

Choose a question. Send one address. Read the answer.

An API lets one program ask another program for information. With CalculationTime, the question is written in a web address and the answer comes back as JSON: labelled values that code can read.

  1. Open a terminal. Run curl 'https://api.calculationtime.com/v1/data/countries'.
  2. The reply contains every country. The rows sit inside data. The fields source, dataset_version and count explain where the table came from, when it changed and how many rows it holds.
  3. Change the address to ask another question. For example, /v1/date/add?start=2026-10-12&days=90 finds the date 90 days after 12 October 2026.

Every request begins with https://api.calculationtime.com. Most replies are JSON. The two reading guides at / and /beginner are Markdown.

What you can ask

Use a table, or ask for a calculation

Reference tables return dependable lists your program can reuse. Calculation endpoints take your inputs and return a result. The live console above lets you try both before writing code.

The 11 reference tables

AddressWhat is in it
/v1/data/countriesEvery country with its capital, ISO codes, calling code and currency
/v1/data/timezonesIANA time zones with their offset from UTC right now and whether daylight saving is on
/v1/data/elementsThe periodic table: symbol, atomic number, mass and group
/v1/data/constantsThe speed of light, the gravitational constant and other fixed values, with units
/v1/data/materials/densityHow heavy common building and household materials are per cubic metre
/v1/data/http-statusEvery web status code from 100 to 599 with its name and class
/v1/data/mime-typesFile extensions and the MIME type a server should send with each
/v1/data/unicode-blocksThe ranges of the Unicode character set, from Basic Latin to emoji
/v1/data/constellationsAll 88 IAU constellations with their genitive, abbreviation and sky quadrant
/v1/data/stars/brightThe brightest stars with their position, brightness and constellation
/v1/data/meteor-showersThe major yearly meteor showers with their peak dates and rates

Tables change rarely, so a reply may be cached for up to 30 days. A new dataset_version means the data has changed.

The calculation families

Ask about dates, maths, astronomy, money, trade jobs, payroll, places, local time, holidays, health or statistics. Each operation is listed below with its inputs and a request you can copy.

A worked example

Three cities. One meeting. Three useful requests.

A meeting time can look right and still be wrong. Daylight saving changes on different dates around the world. The chosen day may also be a public holiday. This example uses three real API requests to find a workable hour for Sydney, London and New York.

1. Ask what time it is somewhere

The first request sends Sydney's latitude and longitude. In the JSON reply, timezone names the zone, local_time_24h gives the clock time, utc_offset measures the difference from UTC, and is_dst says whether daylight saving is active.

2. Ask for each city's offset on the meeting day

Today's UTC offset may not apply on the meeting day. The at=input asks for the offset on that date. The table then compares all 24 UTC hours. Green means 9 am to 5 pm, amber means early or late, and red means the middle of someone's night.

3. Check the day isn't a public holiday

At the same moment, Sydney and New York can be on different dates. The final request checks each city's local date. Try 26 November 2026: the United States check identifies Thanksgiving.

The whole thing in your own code

This JavaScript performs the same work. Paste it into a browser console and press Enter. No key or sign-up is needed.

const api = 'https://api.calculationtime.com';
const day = '2026-11-26';
const cities = [
  { name: 'Sydney', lat: -33.87, lon: 151.21, country: 'AU' },
  { name: 'London', lat: 51.51, lon: -0.13, country: 'GB' },
  { name: 'New York', lat: 40.71, lon: -74.01, country: 'US' }
];
for (const c of cities) {
  const t = await (await fetch(`${api}/v1/time?lat=${c.lat}&lon=${c.lon}&at=${day}T12:00:00Z`)).json();
  c.offset = t.utc_offset_minutes / 60;
}
for (let utc = 0; utc < 24; utc++) {
  const local = cities.map((c) => (utc + c.offset + 24) % 24);
  if (local.every((h) => h >= 7 && h < 21)) console.log(`${utc}:00 UTC ->`, cities.map((c, i) => `${c.name} ${local[i]}:00`).join(', '));
}
const h = await (await fetch(`${api}/v1/holidays/is-business-day?country=US&date=${day}`)).json();
console.log('New York:', h.holiday ? h.holiday.name : 'working day');

Find an endpoint

The complete API reference

Open a subject family, then choose an operation. Each line shows its inputs and a request you can copy. Replace the example values with your own. The list contains 192 operations and matches the contract captured on 2026-10-29.

Reference tables (11) — Countries, time zones, elements, constants and more.
GET/v1/data/countriesCountry reference table with capitals, ISO codes, dialing codes, and currencies

No inputs.

curl 'https://api.calculationtime.com/v1/data/countries'
GET/v1/data/timezonesIANA timezone reference with current UTC offsets and DST status

No inputs.

curl 'https://api.calculationtime.com/v1/data/timezones'
GET/v1/data/elementsPeriodic table reference values

No inputs.

curl 'https://api.calculationtime.com/v1/data/elements'
GET/v1/data/constantsPhysical and mathematical constants reference table

No inputs.

curl 'https://api.calculationtime.com/v1/data/constants'
GET/v1/data/materials/densityCommon material density reference table

No inputs.

curl 'https://api.calculationtime.com/v1/data/materials/density'
GET/v1/data/http-statusHTTP status code directory

No inputs.

curl 'https://api.calculationtime.com/v1/data/http-status'
GET/v1/data/mime-typesMIME type and extension reference table

No inputs.

curl 'https://api.calculationtime.com/v1/data/mime-types'
GET/v1/data/unicode-blocksUnicode block range reference table

No inputs.

curl 'https://api.calculationtime.com/v1/data/unicode-blocks'
GET/v1/data/constellationsIAU constellation names, genitives, abbreviations, and quadrants

No inputs.

curl 'https://api.calculationtime.com/v1/data/constellations'
GET/v1/data/stars/brightBright star reference table

No inputs.

curl 'https://api.calculationtime.com/v1/data/stars/bright'
GET/v1/data/meteor-showersMajor annual meteor shower reference table

No inputs.

curl 'https://api.calculationtime.com/v1/data/meteor-showers'
Service, guides and first calls (13) — Status, health, the contract, the Markdown guides and a ladder of first calls. (The health family also holds the BMI, BMR, energy, macro and pace endpoints, listed under Health below.)
GET/Markdown API documentation

No inputs.

curl 'https://api.calculationtime.com/'
GET/beginnerBeginner-friendly first API call guide

No inputs.

curl 'https://api.calculationtime.com/beginner'
GET/learnKid-level clickable API learning ladder

No inputs.

curl 'https://api.calculationtime.com/learn'
GET/v1/learn/date-add-7Learning demo: add 7 days to today

No inputs.

curl 'https://api.calculationtime.com/v1/learn/date-add-7'
GET/v1/learn/date-add-30Learning demo: add 30 days to today

No inputs.

curl 'https://api.calculationtime.com/v1/learn/date-add-30'
GET/v1/learn/date-add-90Learning demo: add 90 days to today

No inputs.

curl 'https://api.calculationtime.com/v1/learn/date-add-90'
GET/v1/learn/next-saturday-business-dayLearning demo: check whether next Saturday is a business day

No inputs.

curl 'https://api.calculationtime.com/v1/learn/next-saturday-business-day'
GET/v1/learn/random-idLearning demo: generate a random UUID

No inputs.

curl 'https://api.calculationtime.com/v1/learn/random-id'
GET/healthLow-level service health

No inputs.

curl 'https://api.calculationtime.com/health'
GET/openapi.jsonOpenAPI contract for live routes

No inputs.

curl 'https://api.calculationtime.com/openapi.json'
GET/v1/statusPublic measured service status and endpoint inventory

No inputs.

curl 'https://api.calculationtime.com/v1/status'
GET/v1/time/utcCurrent UTC timestamp and clock-model metadata

No inputs.

curl 'https://api.calculationtime.com/v1/time/utc'
GET/api/v1/utility/taglineDeterministic daily CalculationTime tagline

No inputs.

curl 'https://api.calculationtime.com/api/v1/utility/tagline'
Dates (15) — Day counts, adding units or business days, week numbers, ages, quarters and leap years.
GET/v1/date/differenceCalendar day difference

Inputs: start, end

curl 'https://api.calculationtime.com/v1/date/difference?start=2026-01-01&end=2026-12-31'
POST/v1/date/difference/batchBatch calendar day differences

Inputs: ranges

curl -X POST 'https://api.calculationtime.com/v1/date/difference/batch' \
  -H 'Content-Type: application/json' \
  -d '{"ranges":[{"start":"2026-07-12","end":"2026-08-01"}]}'
GET/v1/date/addAdd calendar units to a date

Inputs: date, days, months, years

curl 'https://api.calculationtime.com/v1/date/add?date=2026-11-26&days=<days>&months=<months>&years=<years>'
POST/v1/date/business-daysBusiness-day count with supplied holidays

Inputs: start, end, holidays

curl -X POST 'https://api.calculationtime.com/v1/date/business-days' \
  -H 'Content-Type: application/json' \
  -d '{"start":"2026-07-13","end":"2026-07-17","holidays":["2026-07-15"]}'
POST/v1/date/business-days/jurisdictionBusiness-day count for a supported jurisdiction

Inputs: start, end, jurisdiction

curl -X POST 'https://api.calculationtime.com/v1/date/business-days/jurisdiction' \
  -H 'Content-Type: application/json' \
  -d '{"start":"2026-07-13","end":"2026-07-17","jurisdiction":"US"}'
POST/v1/date/business-days-addAdd or subtract configurable business days

Inputs: start, business_days, weekend_days, holidays

curl -X POST 'https://api.calculationtime.com/v1/date/business-days-add' \
  -H 'Content-Type: application/json' \
  -d '{"start":"2026-07-13","business_days":10,"weekend_days":[6,7],"holidays":["2026-07-20"]}'
POST/v1/date/iso-weekISO week number, week-year, and weekday

Inputs: date

curl -X POST 'https://api.calculationtime.com/v1/date/iso-week' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-01-01"}'
POST/v1/date/age-breakdownExact age duration breakdown from birth date to timestamp

Inputs: birth_date, as_of

curl -X POST 'https://api.calculationtime.com/v1/date/age-breakdown' \
  -H 'Content-Type: application/json' \
  -d '{"birth_date":"1990-05-15","as_of":"2026-09-21T00:00:00Z"}'
POST/v1/date/countdown-precisePrecise calendar delta between timestamps

Inputs: start, end

curl -X POST 'https://api.calculationtime.com/v1/date/countdown-precise' \
  -H 'Content-Type: application/json' \
  -d '{"start":"2026-09-21T00:00:00Z","end":"2027-01-01T12:30:15Z"}'
POST/v1/date/epoch-converterUnix epoch seconds or milliseconds to ISO/RFC strings

Inputs: epoch, unit

curl -X POST 'https://api.calculationtime.com/v1/date/epoch-converter' \
  -H 'Content-Type: application/json' \
  -d '{"epoch":1789941600,"unit":"seconds"}'
POST/v1/date/quarter-calculatorCalendar and fiscal quarter with progress percentage

Inputs: date, fiscal_start_month

curl -X POST 'https://api.calculationtime.com/v1/date/quarter-calculator' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-09-21","fiscal_start_month":4}'
POST/v1/date/leap-year-checkGregorian and Julian leap-year proof check

Inputs: year

curl -X POST 'https://api.calculationtime.com/v1/date/leap-year-check' \
  -H 'Content-Type: application/json' \
  -d '{"year":2028}'
POST/v1/date/days-in-monthDays in a Gregorian month

Inputs: year, month

curl -X POST 'https://api.calculationtime.com/v1/date/days-in-month' \
  -H 'Content-Type: application/json' \
  -d '{"year":2028,"month":2}'
POST/v1/date/timezone-offsetFixed UTC offset conversion without DST lookup

Inputs: timestamp, offset

curl -X POST 'https://api.calculationtime.com/v1/date/timezone-offset' \
  -H 'Content-Type: application/json' \
  -d '{"timestamp":"2026-09-21T00:00:00Z","offset":"+10:00"}'
POST/v1/date/calendar-rangeGenerate a deterministic date range with weekday and ISO week facts

Inputs: start, days, weekend_days

curl -X POST 'https://api.calculationtime.com/v1/date/calendar-range' \
  -H 'Content-Type: application/json' \
  -d '{"start":"2026-09-21","days":14,"weekend_days":[6,7]}'
Schedules and shifts (10) — Cron run times, working-day shifts, shift hours with overtime, project finish dates, monthly repeats and booking blocks.
POST/api/v1/schedule/cron-parserList upcoming UTC run timestamps for a 5-field cron expression

Inputs: expression, from, count

curl -X POST 'https://api.calculationtime.com/api/v1/schedule/cron-parser' \
  -H 'Content-Type: application/json' \
  -d '{"expression":"*/15 9-17 * * 1-5","from":"2026-09-21T08:00:00Z","count":5}'
POST/api/v1/schedule/workday-shiftShift a date by configurable working days

Inputs: date, days, weekend_days

curl -X POST 'https://api.calculationtime.com/api/v1/schedule/workday-shift' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-09-21","days":10,"weekend_days":[6,7]}'
POST/api/v1/schedule/date-range-splitSplit a date range into week, month, or quarter chunks

Inputs: start, end, unit

curl -X POST 'https://api.calculationtime.com/api/v1/schedule/date-range-split' \
  -H 'Content-Type: application/json' \
  -d '{"start":"2026-01-01","end":"2026-03-31","unit":"month"}'
POST/api/v1/schedule/interval-overlapCalculate overlap between two timestamp intervals

Inputs: a_start, a_end, b_start, b_end

curl -X POST 'https://api.calculationtime.com/api/v1/schedule/interval-overlap' \
  -H 'Content-Type: application/json' \
  -d '{"a_start":"2026-09-21T09:00:00Z","a_end":"2026-09-21T12:00:00Z","b_start":"2026-09-21T11:00:00Z","b_end":"2026-09-21T13:00:00Z"}'
POST/api/v1/schedule/project-timelineForward-pass project timeline and critical finish calculation

Inputs: start, tasks

curl -X POST 'https://api.calculationtime.com/api/v1/schedule/project-timeline' \
  -H 'Content-Type: application/json' \
  -d '{"start":"2026-09-21","tasks":[{"id":"design","duration_days":3},{"id":"build","duration_days":5,"dependencies":["design"]}]}'
POST/api/v1/schedule/shift-calculatorCalculate shift hours, overtime, and night differential hours

Inputs: start, end, overtime_after_hours

curl -X POST 'https://api.calculationtime.com/api/v1/schedule/shift-calculator' \
  -H 'Content-Type: application/json' \
  -d '{"start":"2026-09-21T20:00:00Z","end":"2026-09-22T06:00:00Z","overtime_after_hours":8}'
POST/api/v1/schedule/countdown-workdaysCount business days remaining until a deadline

Inputs: start, target, weekend_days

curl -X POST 'https://api.calculationtime.com/api/v1/schedule/countdown-workdays' \
  -H 'Content-Type: application/json' \
  -d '{"start":"2026-09-21","target":"2026-10-02","weekend_days":[6,7]}'
POST/api/v1/schedule/recurring-monthlyGenerate nth-weekday monthly recurrence dates

Inputs: year, start_month, months, ordinal, weekday

curl -X POST 'https://api.calculationtime.com/api/v1/schedule/recurring-monthly' \
  -H 'Content-Type: application/json' \
  -d '{"year":2026,"start_month":1,"months":3,"ordinal":3,"weekday":"tuesday"}'
POST/api/v1/schedule/age-in-daysCalculate an exact age milestone date in days

Inputs: birth_date, days

curl -X POST 'https://api.calculationtime.com/api/v1/schedule/age-in-days' \
  -H 'Content-Type: application/json' \
  -d '{"birth_date":"1990-05-15","days":10000}'
POST/api/v1/schedule/time-blocksDivide a 24-hour day into equal booking blocks

Inputs: minutes

curl -X POST 'https://api.calculationtime.com/api/v1/schedule/time-blocks' \
  -H 'Content-Type: application/json' \
  -d '{"minutes":30}'
Maths (35) — Equations, shapes, statistics, ratios, logs and counting.
POST/api/v1/math/matrix-multiplyMultiply two 2x2 or 3x3-compatible matrices

Inputs: a, b

curl -X POST 'https://api.calculationtime.com/api/v1/math/matrix-multiply' \
  -H 'Content-Type: application/json' \
  -d '{"a":[[1,2],[3,4]],"b":[[5,6],[7,8]]}'
POST/api/v1/math/vector-magnitudeCalculate vector magnitude and unit vector

Inputs: vector

curl -X POST 'https://api.calculationtime.com/api/v1/math/vector-magnitude' \
  -H 'Content-Type: application/json' \
  -d '{"vector":[3,4]}'
POST/api/v1/math/vector-dot-productCalculate vector dot product and angle

Inputs: a, b

curl -X POST 'https://api.calculationtime.com/api/v1/math/vector-dot-product' \
  -H 'Content-Type: application/json' \
  -d '{"a":[1,0],"b":[0,1]}'
POST/api/v1/math/quadratic-vertexCalculate parabola vertex, axis, and roots

Inputs: a, b, c

curl -X POST 'https://api.calculationtime.com/api/v1/math/quadratic-vertex' \
  -H 'Content-Type: application/json' \
  -d '{"a":1,"b":-4,"c":3}'
POST/api/v1/math/factorial-gammaCalculate factorials and gamma approximations

Inputs: n

curl -X POST 'https://api.calculationtime.com/api/v1/math/factorial-gamma' \
  -H 'Content-Type: application/json' \
  -d '{"n":5}'
POST/api/v1/math/fibonacciCalculate Fibonacci number and sequence

Inputs: n

curl -X POST 'https://api.calculationtime.com/api/v1/math/fibonacci' \
  -H 'Content-Type: application/json' \
  -d '{"n":10}'
POST/api/v1/math/base-n-convertConvert integers between base 2 and base 36

Inputs: value, from_base, to_base

curl -X POST 'https://api.calculationtime.com/api/v1/math/base-n-convert' \
  -H 'Content-Type: application/json' \
  -d '{"value":"ff","from_base":16,"to_base":2}'
POST/api/v1/math/percentile-calcCalculate statistical percentile from raw values

Inputs: values, percentile

curl -X POST 'https://api.calculationtime.com/api/v1/math/percentile-calc' \
  -H 'Content-Type: application/json' \
  -d '{"values":[1,2,3,4,5],"percentile":90}'
POST/api/v1/math/wind-chillCalculate wind chill apparent temperature

Inputs: temperature_c, wind_kmh

curl -X POST 'https://api.calculationtime.com/api/v1/math/wind-chill' \
  -H 'Content-Type: application/json' \
  -d '{"temperature_c":0,"wind_kmh":20}'
POST/api/v1/math/heat-indexCalculate heat index apparent temperature

Inputs: temperature_c, relative_humidity

curl -X POST 'https://api.calculationtime.com/api/v1/math/heat-index' \
  -H 'Content-Type: application/json' \
  -d '{"temperature_c":32,"relative_humidity":70}'
POST/v1/math/quadratic-solverSolve a quadratic equation with real or complex roots and vertex coordinates

Inputs: a, b, c

curl -X POST 'https://api.calculationtime.com/v1/math/quadratic-solver' \
  -H 'Content-Type: application/json' \
  -d '{"a":1,"b":-3,"c":2}'
POST/v1/math/pythagorean-solveSolve the missing side of a right triangle from any two sides

Inputs: a, b

curl -X POST 'https://api.calculationtime.com/v1/math/pythagorean-solve' \
  -H 'Content-Type: application/json' \
  -d '{"a":3,"b":4}'
POST/v1/math/triangle-heronTriangle area, perimeter, and angles from three side lengths

Inputs: a, b, c

curl -X POST 'https://api.calculationtime.com/v1/math/triangle-heron' \
  -H 'Content-Type: application/json' \
  -d '{"a":3,"b":4,"c":5}'
POST/v1/math/circle-geometryCircle area, circumference, diameter, arc length, and sector area

Inputs: radius, angle_degrees

curl -X POST 'https://api.calculationtime.com/v1/math/circle-geometry' \
  -H 'Content-Type: application/json' \
  -d '{"radius":10,"angle_degrees":90}'
POST/v1/math/sphere-geometrySphere diameter, surface area, and volume from radius

Inputs: radius

curl -X POST 'https://api.calculationtime.com/v1/math/sphere-geometry' \
  -H 'Content-Type: application/json' \
  -d '{"radius":3}'
POST/v1/math/cylinder-geometryCylinder base area, surface area, and volume from radius and height

Inputs: radius, height

curl -X POST 'https://api.calculationtime.com/v1/math/cylinder-geometry' \
  -H 'Content-Type: application/json' \
  -d '{"radius":3,"height":10}'
POST/v1/math/statistics-summaryMean, median, mode, variance, standard deviation, and IQR for numbers

Inputs: values

curl -X POST 'https://api.calculationtime.com/v1/math/statistics-summary' \
  -H 'Content-Type: application/json' \
  -d '{"values":[1,2,2,4,9]}'
POST/v1/math/percentage-changeAbsolute and percentage change from baseline to current value

Inputs: baseline, current

curl -X POST 'https://api.calculationtime.com/v1/math/percentage-change' \
  -H 'Content-Type: application/json' \
  -d '{"baseline":80,"current":100}'
POST/v1/math/percent-errorAbsolute, relative, and percent error against an accepted true value

Inputs: true_value, measured_value

curl -X POST 'https://api.calculationtime.com/v1/math/percent-error' \
  -H 'Content-Type: application/json' \
  -d '{"true_value":100,"measured_value":96}'
POST/v1/math/gcd-lcmGreatest common divisor and least common multiple for integer sets

Inputs: values

curl -X POST 'https://api.calculationtime.com/v1/math/gcd-lcm' \
  -H 'Content-Type: application/json' \
  -d '{"values":[12,18,30]}'
POST/v1/math/matrix-determinantDeterminants for 2x2 and 3x3 matrices

Inputs: matrix

curl -X POST 'https://api.calculationtime.com/v1/math/matrix-determinant' \
  -H 'Content-Type: application/json' \
  -d '{"matrix":[[1,2],[3,4]]}'
POST/v1/math/proportion-solverSolve x in equivalent ratios a/b = c/x

Inputs: a, b, c

curl -X POST 'https://api.calculationtime.com/v1/math/proportion-solver' \
  -H 'Content-Type: application/json' \
  -d '{"a":2,"b":5,"c":8}'
POST/v1/math/logarithm-evalEvaluate logarithms with custom bases using change of base

Inputs: value, base

curl -X POST 'https://api.calculationtime.com/v1/math/logarithm-eval' \
  -H 'Content-Type: application/json' \
  -d '{"value":1000,"base":10}'
POST/v1/math/exponent-evalEvaluate exponentiation and optional real root extraction

Inputs: base, exponent, root

curl -X POST 'https://api.calculationtime.com/v1/math/exponent-eval' \
  -H 'Content-Type: application/json' \
  -d '{"base":27,"exponent":2,"root":3}'
POST/v1/math/combinatoricsPermutations and combinations for n and r

Inputs: n, r

curl -X POST 'https://api.calculationtime.com/v1/math/combinatorics' \
  -H 'Content-Type: application/json' \
  -d '{"n":10,"r":3}'
POST/api/v1/math/ohm-lawOhm law solver for voltage, current, resistance, and power

Inputs: voltage, resistance

curl -X POST 'https://api.calculationtime.com/api/v1/math/ohm-law' \
  -H 'Content-Type: application/json' \
  -d '{"voltage":12,"resistance":4}'
POST/api/v1/math/projectile-rangeIdeal projectile range, flight time, and max height

Inputs: velocity, angle_degrees

curl -X POST 'https://api.calculationtime.com/api/v1/math/projectile-range' \
  -H 'Content-Type: application/json' \
  -d '{"velocity":30,"angle_degrees":45}'
POST/api/v1/math/kinetic-energyKinetic energy from mass and velocity

Inputs: mass, velocity

curl -X POST 'https://api.calculationtime.com/api/v1/math/kinetic-energy' \
  -H 'Content-Type: application/json' \
  -d '{"mass":10,"velocity":12}'
POST/api/v1/math/potential-energyGravitational potential energy

Inputs: mass, height

curl -X POST 'https://api.calculationtime.com/api/v1/math/potential-energy' \
  -H 'Content-Type: application/json' \
  -d '{"mass":10,"height":5}'
POST/api/v1/math/circle-sectorCircle sector area, arc, and chord length

Inputs: radius, angle_degrees

curl -X POST 'https://api.calculationtime.com/api/v1/math/circle-sector' \
  -H 'Content-Type: application/json' \
  -d '{"radius":10,"angle_degrees":90}'
POST/api/v1/math/sphere-surfaceSphere surface area and volume alias

Inputs: radius

curl -X POST 'https://api.calculationtime.com/api/v1/math/sphere-surface' \
  -H 'Content-Type: application/json' \
  -d '{"radius":3}'
POST/api/v1/math/cone-geometryCone slant height, surface area, and volume

Inputs: radius, height

curl -X POST 'https://api.calculationtime.com/api/v1/math/cone-geometry' \
  -H 'Content-Type: application/json' \
  -d '{"radius":3,"height":4}'
POST/api/v1/math/torus-geometryTorus surface area and volume

Inputs: major_radius, minor_radius

curl -X POST 'https://api.calculationtime.com/api/v1/math/torus-geometry' \
  -H 'Content-Type: application/json' \
  -d '{"major_radius":5,"minor_radius":2}'
POST/api/v1/math/arithmetic-progressionArithmetic progression nth term and partial sum

Inputs: first, difference, n

curl -X POST 'https://api.calculationtime.com/api/v1/math/arithmetic-progression' \
  -H 'Content-Type: application/json' \
  -d '{"first":2,"difference":3,"n":10}'
POST/api/v1/math/geometric-progressionGeometric progression nth term and partial sum

Inputs: first, ratio, n

curl -X POST 'https://api.calculationtime.com/api/v1/math/geometric-progression' \
  -H 'Content-Type: application/json' \
  -d '{"first":2,"ratio":3,"n":5}'
Astronomy (24) — The Sun, the Moon, twilight, seasons, sidereal time, Julian Days and the Southern Cross clock hand.
GET/v1/solar/positionSolar position for date and coordinate

Inputs: lat, lon, at

curl 'https://api.calculationtime.com/v1/solar/position?lat=-33.87&lon=151.21&at=2026-10-12T09:00:00Z'
GET/v1/astronomy/ephemerisAstronomy ephemeris for a date

Inputs: date

curl 'https://api.calculationtime.com/v1/astronomy/ephemeris?date=2026-11-26'
POST/v1/astronomy/crux-midnightCrux clock hand midnight sidereal positions from the St George, QLD zero meridian calibration

Inputs: start_date, days, timezone

curl -X POST 'https://api.calculationtime.com/v1/astronomy/crux-midnight' \
  -H 'Content-Type: application/json' \
  -d '{"start_date":"2026-04-01","days":365,"timezone":"+10:00"}'
POST/v1/astronomy/crux-hourlyCrux clock hand hourly sidereal breakdown for one local date

Inputs: date, timezone

curl -X POST 'https://api.calculationtime.com/v1/astronomy/crux-hourly' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-04-01","timezone":"+10:00"}'
POST/v1/astronomy/crux-currentCurrent Crux clock hand position and zero alignment delta

Inputs: timestamp

curl -X POST 'https://api.calculationtime.com/v1/astronomy/crux-current' \
  -H 'Content-Type: application/json' \
  -d '{"timestamp":"2026-04-01T00:00:00+10:00"}'
POST/v1/astronomy/solar-noonSolar transit/noon timestamp for a coordinate and date

Inputs: date, lat, lon

curl -X POST 'https://api.calculationtime.com/v1/astronomy/solar-noon' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-06-21","lat":48.137154,"lon":11.576124}'
POST/v1/astronomy/equinox-solsticeEquinox and solstice timestamps for a year

Inputs: year

curl -X POST 'https://api.calculationtime.com/v1/astronomy/equinox-solstice' \
  -H 'Content-Type: application/json' \
  -d '{"year":2026}'
POST/v1/astronomy/moon-phaseMoon illumination, age, and phase name for a timestamp

Inputs: timestamp

curl -X POST 'https://api.calculationtime.com/v1/astronomy/moon-phase' \
  -H 'Content-Type: application/json' \
  -d '{"timestamp":"2026-06-21T00:00:00Z"}'
POST/v1/astronomy/julian-dateGregorian timestamp to Julian Day and Modified Julian Date

Inputs: timestamp

curl -X POST 'https://api.calculationtime.com/v1/astronomy/julian-date' \
  -H 'Content-Type: application/json' \
  -d '{"timestamp":"2026-06-21T00:00:00Z"}'
POST/v1/astronomy/sidereal-timeGreenwich and local sidereal time for a timestamp and longitude

Inputs: timestamp, lon

curl -X POST 'https://api.calculationtime.com/v1/astronomy/sidereal-time' \
  -H 'Content-Type: application/json' \
  -d '{"timestamp":"2026-06-21T00:00:00Z","lon":11.576124}'
POST/v1/astronomy/twilight-calculatorCivil, nautical, and astronomical twilight crossings

Inputs: date, lat, lon

curl -X POST 'https://api.calculationtime.com/v1/astronomy/twilight-calculator' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-06-21","lat":48.137154,"lon":11.576124}'
POST/v1/astronomy/sun-positionSun right ascension, declination, azimuth, and elevation

Inputs: timestamp, lat, lon

curl -X POST 'https://api.calculationtime.com/v1/astronomy/sun-position' \
  -H 'Content-Type: application/json' \
  -d '{"timestamp":"2026-06-21T12:00:00Z","lat":48.137154,"lon":11.576124}'
POST/v1/astronomy/moon-positionMoon right ascension, declination, azimuth, and elevation

Inputs: timestamp, lat, lon

curl -X POST 'https://api.calculationtime.com/v1/astronomy/moon-position' \
  -H 'Content-Type: application/json' \
  -d '{"timestamp":"2026-06-21T00:00:00Z","lat":48.137154,"lon":11.576124}'
POST/v1/astronomy/day-lengthDaylight duration between sunrise and sunset

Inputs: date, lat, lon

curl -X POST 'https://api.calculationtime.com/v1/astronomy/day-length' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-06-21","lat":48.137154,"lon":11.576124}'
POST/v1/astronomy/polar-night-checkCheck midnight sun or polar night state for a latitude/date

Inputs: date, lat, lon

curl -X POST 'https://api.calculationtime.com/v1/astronomy/polar-night-check' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-06-21","lat":80,"lon":0}'
POST/api/v1/astronomy/solar-declinationApproximate solar declination angle for a date

Inputs: date

curl -X POST 'https://api.calculationtime.com/api/v1/astronomy/solar-declination' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-06-21"}'
POST/api/v1/astronomy/equation-of-timeApproximate equation of time for a date

Inputs: date

curl -X POST 'https://api.calculationtime.com/api/v1/astronomy/equation-of-time' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-06-21"}'
POST/api/v1/astronomy/moon-illuminationMoon illumination fraction and phase angle

Inputs: timestamp

curl -X POST 'https://api.calculationtime.com/api/v1/astronomy/moon-illumination' \
  -H 'Content-Type: application/json' \
  -d '{"timestamp":"2026-06-21T00:00:00Z"}'
POST/api/v1/astronomy/sidereal-conversionConvert solar hours to sidereal interval

Inputs: solar_hours

curl -X POST 'https://api.calculationtime.com/api/v1/astronomy/sidereal-conversion' \
  -H 'Content-Type: application/json' \
  -d '{"solar_hours":24}'
POST/api/v1/astronomy/golden-hourMorning and evening golden-hour windows

Inputs: date, lat, lon

curl -X POST 'https://api.calculationtime.com/api/v1/astronomy/golden-hour' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-06-21","lat":48.137154,"lon":11.576124}'
POST/api/v1/astronomy/blue-hourMorning and evening blue-hour windows

Inputs: date, lat, lon

curl -X POST 'https://api.calculationtime.com/api/v1/astronomy/blue-hour' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-06-21","lat":48.137154,"lon":11.576124}'
POST/api/v1/astronomy/season-progressAstronomical season progress at a timestamp

Inputs: timestamp

curl -X POST 'https://api.calculationtime.com/api/v1/astronomy/season-progress' \
  -H 'Content-Type: application/json' \
  -d '{"timestamp":"2026-06-21T00:00:00Z"}'
POST/api/v1/astronomy/zodiac-signTropical zodiac sign by calendar date

Inputs: date

curl -X POST 'https://api.calculationtime.com/api/v1/astronomy/zodiac-sign' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-06-21"}'
POST/api/v1/astronomy/daylight-deltaDay-length gain or loss versus previous day

Inputs: date, lat, lon

curl -X POST 'https://api.calculationtime.com/api/v1/astronomy/daylight-delta' \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-06-21","lat":48.137154,"lon":11.576124}'
Money (24) — Loans, interest, margins, tax, break-even and growth.
POST/api/v1/finance/npvCalculate net present value for uneven cash flows

Inputs: discount_rate_percent, cashflows

curl -X POST 'https://api.calculationtime.com/api/v1/finance/npv' \
  -H 'Content-Type: application/json' \
  -d '{"discount_rate_percent":8,"cashflows":[-1000,400,400,400]}'
POST/api/v1/finance/irr-approximationApproximate internal rate of return from cash flows

Inputs: cashflows

curl -X POST 'https://api.calculationtime.com/api/v1/finance/irr-approximation' \
  -H 'Content-Type: application/json' \
  -d '{"cashflows":[-1000,400,400,400]}'
POST/api/v1/finance/bond-yieldCalculate current yield and approximate yield to maturity

Inputs: face_value, price, coupon_rate_percent, years_to_maturity

curl -X POST 'https://api.calculationtime.com/api/v1/finance/bond-yield' \
  -H 'Content-Type: application/json' \
  -d '{"face_value":1000,"price":950,"coupon_rate_percent":5,"years_to_maturity":10}'
POST/api/v1/finance/depreciation-straight-lineGenerate a straight-line depreciation schedule

Inputs: cost, salvage_value, life_years

curl -X POST 'https://api.calculationtime.com/api/v1/finance/depreciation-straight-line' \
  -H 'Content-Type: application/json' \
  -d '{"cost":10000,"salvage_value":1000,"life_years":5}'
POST/api/v1/finance/depreciation-decliningGenerate a declining-balance depreciation schedule

Inputs: cost, salvage_value, life_years

curl -X POST 'https://api.calculationtime.com/api/v1/finance/depreciation-declining' \
  -H 'Content-Type: application/json' \
  -d '{"cost":10000,"salvage_value":1000,"life_years":5}'
POST/api/v1/finance/loan-payoff-extraCalculate loan payoff impact from extra monthly principal

Inputs: principal, annual_rate_percent, monthly_payment, extra_payment

curl -X POST 'https://api.calculationtime.com/api/v1/finance/loan-payoff-extra' \
  -H 'Content-Type: application/json' \
  -d '{"principal":200000,"annual_rate_percent":5,"monthly_payment":1200,"extra_payment":100}'
POST/api/v1/finance/effective-annual-rateConvert nominal APR to effective annual rate

Inputs: nominal_rate_percent, compounds_per_year

curl -X POST 'https://api.calculationtime.com/api/v1/finance/effective-annual-rate' \
  -H 'Content-Type: application/json' \
  -d '{"nominal_rate_percent":6,"compounds_per_year":12}'
POST/api/v1/finance/markup-margin-splitConvert between markup, margin, cost, and selling price

Inputs: cost, price

curl -X POST 'https://api.calculationtime.com/api/v1/finance/markup-margin-split' \
  -H 'Content-Type: application/json' \
  -d '{"cost":60,"price":100}'
POST/api/v1/finance/break-even-multiCalculate weighted break-even across multiple products

Inputs: fixed_costs, products

curl -X POST 'https://api.calculationtime.com/api/v1/finance/break-even-multi' \
  -H 'Content-Type: application/json' \
  -d '{"fixed_costs":10000,"products":[{"name":"A","price":50,"variable_cost":20,"mix":2},{"name":"B","price":80,"variable_cost":40,"mix":1}]}'
POST/api/v1/finance/tip-splitCalculate tip, total, and per-person split

Inputs: subtotal, tip_percent, people

curl -X POST 'https://api.calculationtime.com/api/v1/finance/tip-split' \
  -H 'Content-Type: application/json' \
  -d '{"subtotal":120,"tip_percent":20,"people":4}'
POST/v1/finance/margin-markupGross margin, markup, selling price, and cost variance

Inputs: cost, selling_price, actual_cost

curl -X POST 'https://api.calculationtime.com/v1/finance/margin-markup' \
  -H 'Content-Type: application/json' \
  -d '{"cost":80,"selling_price":125,"actual_cost":92}'
POST/v1/finance/loan-amortizationFixed-rate loan amortization schedule

Inputs: principal, annual_interest_rate_percent, term_months

curl -X POST 'https://api.calculationtime.com/v1/finance/loan-amortization' \
  -H 'Content-Type: application/json' \
  -d '{"principal":250000,"annual_interest_rate_percent":6.25,"term_months":360}'
POST/v1/finance/tax-extractionTax add-on and inclusive reverse extraction

Inputs: amounts

curl -X POST 'https://api.calculationtime.com/v1/finance/tax-extraction' \
  -H 'Content-Type: application/json' \
  -d '{"amounts":[{"label":"VAT inclusive","amount":120,"tax_rate_percent":20,"mode":"inclusive"}]}'
POST/v1/finance/freelancer-rateFreelancer hourly and daily rate target

Inputs: target_annual_income, annual_expenses, tax_overhead_percent, billable_weeks, billable_hours_per_week

curl -X POST 'https://api.calculationtime.com/v1/finance/freelancer-rate' \
  -H 'Content-Type: application/json' \
  -d '{"target_annual_income":80000,"annual_expenses":20000,"tax_overhead_percent":25,"billable_weeks":40,"billable_hours_per_week":25}'
POST/v1/finance/simple-interestSimple interest from principal, rate, and time

Inputs: principal, annual_rate_percent, years

curl -X POST 'https://api.calculationtime.com/v1/finance/simple-interest' \
  -H 'Content-Type: application/json' \
  -d '{"principal":1000,"annual_rate_percent":5,"years":3}'
POST/v1/finance/compound-interestFuture value with compound interest frequency options

Inputs: principal, annual_rate_percent, years, compounds_per_year

curl -X POST 'https://api.calculationtime.com/v1/finance/compound-interest' \
  -H 'Content-Type: application/json' \
  -d '{"principal":1000,"annual_rate_percent":5,"years":10,"compounds_per_year":12}'
POST/v1/finance/loan-amortization-summaryLoan payment, total interest, and total cost summary

Inputs: principal, annual_interest_rate_percent, term_months

curl -X POST 'https://api.calculationtime.com/v1/finance/loan-amortization-summary' \
  -H 'Content-Type: application/json' \
  -d '{"principal":250000,"annual_interest_rate_percent":6.25,"term_months":360}'
POST/v1/finance/rule-of-72Estimated investment doubling time using the rule of 72

Inputs: annual_rate_percent

curl -X POST 'https://api.calculationtime.com/v1/finance/rule-of-72' \
  -H 'Content-Type: application/json' \
  -d '{"annual_rate_percent":6}'
POST/v1/finance/roiReturn on investment percentage from cost and net gain

Inputs: cost, net_gain

curl -X POST 'https://api.calculationtime.com/v1/finance/roi' \
  -H 'Content-Type: application/json' \
  -d '{"cost":1000,"net_gain":250}'
POST/v1/finance/discount-calculatorFinal price and savings from original price and discount rate

Inputs: original_price, discount_percent

curl -X POST 'https://api.calculationtime.com/v1/finance/discount-calculator' \
  -H 'Content-Type: application/json' \
  -d '{"original_price":120,"discount_percent":15}'
POST/v1/finance/markup-marginConvert between gross margin and markup percentages

Inputs: margin_percent

curl -X POST 'https://api.calculationtime.com/v1/finance/markup-margin' \
  -H 'Content-Type: application/json' \
  -d '{"margin_percent":40}'
POST/v1/finance/break-evenBreak-even units from fixed costs, variable cost, and price

Inputs: fixed_costs, price_per_unit, variable_cost_per_unit

curl -X POST 'https://api.calculationtime.com/v1/finance/break-even' \
  -H 'Content-Type: application/json' \
  -d '{"fixed_costs":10000,"price_per_unit":50,"variable_cost_per_unit":30}'
POST/v1/finance/salestaxAdd or extract sales tax/GST from an amount and tax rate

Inputs: amount, tax_rate_percent, mode

curl -X POST 'https://api.calculationtime.com/v1/finance/salestax' \
  -H 'Content-Type: application/json' \
  -d '{"amount":120,"tax_rate_percent":20,"mode":"inclusive"}'
POST/v1/finance/cagrCompound annual growth rate from beginning value, ending value, and years

Inputs: beginning_value, ending_value, years

curl -X POST 'https://api.calculationtime.com/v1/finance/cagr' \
  -H 'Content-Type: application/json' \
  -d '{"beginning_value":1000,"ending_value":1500,"years":5}'
Trade jobs and payroll (7) — Job margins, VAT returns, CIS deductions, mileage, depreciation, invoice ageing and timesheets.
POST/v1/payroll/decimal-hoursClock time to decimal hours and overtime conversion

Inputs: hours, minutes, overtime_multiplier

curl -X POST 'https://api.calculationtime.com/v1/payroll/decimal-hours' \
  -H 'Content-Type: application/json' \
  -d '{"hours":1,"minutes":30,"overtime_multiplier":1.5}'
POST/v1/tradie/job-marginTradie job margin from labour, materials, subcontractors, overhead, and quote

Inputs: labour_hours, labour_rate, materials_cost, subcontractor_cost, overhead_percent, quoted_price

curl -X POST 'https://api.calculationtime.com/v1/tradie/job-margin' \
  -H 'Content-Type: application/json' \
  -d '{"labour_hours":16,"labour_rate":45,"materials_cost":380,"subcontractor_cost":250,"overhead_percent":12,"quoted_price":2200}'
POST/v1/tradie/vat-return-summaryTradie VAT return summary from sales and purchases

Inputs: sales, purchases

curl -X POST 'https://api.calculationtime.com/v1/tradie/vat-return-summary' \
  -H 'Content-Type: application/json' \
  -d '{"sales":[{"amount":1200,"tax_rate_percent":20,"mode":"inclusive"}],"purchases":[{"amount":300,"tax_rate_percent":20,"mode":"exclusive"}]}'
POST/v1/tradie/cis-deductionUK CIS-style deduction model for labour and materials

Inputs: gross_labour, materials, deduction_rate_percent

curl -X POST 'https://api.calculationtime.com/v1/tradie/cis-deduction' \
  -H 'Content-Type: application/json' \
  -d '{"gross_labour":1000,"materials":200,"deduction_rate_percent":20}'
POST/v1/tradie/mileage-claimMileage claim and unreimbursed/reimbursed excess calculation

Inputs: miles, rate_per_mile, reimbursed_amount

curl -X POST 'https://api.calculationtime.com/v1/tradie/mileage-claim' \
  -H 'Content-Type: application/json' \
  -d '{"miles":120,"rate_per_mile":0.45,"reimbursed_amount":20}'
POST/v1/tradie/tool-depreciationStraight-line tool and equipment depreciation schedule

Inputs: purchase_price, salvage_value, useful_life_years

curl -X POST 'https://api.calculationtime.com/v1/tradie/tool-depreciation' \
  -H 'Content-Type: application/json' \
  -d '{"purchase_price":1200,"salvage_value":200,"useful_life_years":5}'
POST/v1/tradie/invoice-agingReceivables aging buckets for unpaid invoices

Inputs: as_of, invoices

curl -X POST 'https://api.calculationtime.com/v1/tradie/invoice-aging' \
  -H 'Content-Type: application/json' \
  -d '{"as_of":"2026-09-19","invoices":[{"invoice_id":"INV-1","due_date":"2026-08-01","amount":400}]}'
Places, local time and holidays (11) — Distances, elevation, local time at a coordinate and public holidays.
GET/v1/timeGet local time for one coordinate

Inputs: lat, lon, at

curl 'https://api.calculationtime.com/v1/time?lat=-33.87&lon=151.21&at=2026-10-12T09:00:00Z'
POST/v1/time/batchGet local time for up to 100 coordinates

Inputs: points, at

curl -X POST 'https://api.calculationtime.com/v1/time/batch' \
  -H 'Content-Type: application/json' \
  -d '{"points":[{"lat":48.137154,"lon":11.576124}],"at":"2026-07-29T12:00:00Z"}'
GET/v1/holidaysHolidays for a jurisdiction and year

Inputs: country, year

curl 'https://api.calculationtime.com/v1/holidays?country=US&year=2026'
GET/v1/holidays/nextNext holiday for a jurisdiction

Inputs: country, from

curl 'https://api.calculationtime.com/v1/holidays/next?country=US&from=2026-10-12'
GET/v1/holidays/is-business-dayBusiness-day check for one date

Inputs: country, date

curl 'https://api.calculationtime.com/v1/holidays/is-business-day?country=US&date=2026-11-26'
GET/v1/geo/distanceDistance between two coordinates

Inputs: lat1, lon1, lat2, lon2

curl 'https://api.calculationtime.com/v1/geo/distance?lat1=-33.87&lon1=151.21&lat2=51.51&lon2=-0.13'
POST/v1/geo/distance/batchBatch distance calculations

Inputs: pairs

curl -X POST 'https://api.calculationtime.com/v1/geo/distance/batch' \
  -H 'Content-Type: application/json' \
  -d '{"pairs":[{"from":{"lat":48.137154,"lon":11.576124},"to":{"lat":51.5072,"lon":-0.1276}}]}'
GET/v1/geo/midpointMidpoint between two coordinates

Inputs: lat1, lon1, lat2, lon2

curl 'https://api.calculationtime.com/v1/geo/midpoint?lat1=-33.87&lon1=151.21&lat2=51.51&lon2=-0.13'
GET/v1/geo/bounding-boxBounding box around a coordinate

Inputs: lat, lon, radius_km

curl 'https://api.calculationtime.com/v1/geo/bounding-box?lat=-33.87&lon=151.21&radius_km=10'
GET/v1/geo/elevationElevation for one coordinate

Inputs: lat, lon

curl 'https://api.calculationtime.com/v1/geo/elevation?lat=-33.87&lon=151.21'
GET/v1/geo/nearbyNearby stored geo points

Inputs: lat, lon, radius_km

curl 'https://api.calculationtime.com/v1/geo/nearby?lat=-33.87&lon=151.21&radius_km=10'
Unit conversion (10) — Length, weight, temperature, area, volume, speed, pressure, energy, power and data sizes.
POST/api/v1/convert/lengthZero-cost length unit conversion

Inputs: value, from, to

curl -X POST 'https://api.calculationtime.com/api/v1/convert/length' \
  -H 'Content-Type: application/json' \
  -d '{"value":1,"from":"mile","to":"kilometer"}'
POST/api/v1/convert/weightZero-cost weight and mass unit conversion

Inputs: value, from, to

curl -X POST 'https://api.calculationtime.com/api/v1/convert/weight' \
  -H 'Content-Type: application/json' \
  -d '{"value":10,"from":"pound","to":"kilogram"}'
POST/api/v1/convert/temperatureTemperature scale conversion

Inputs: value, from, to

curl -X POST 'https://api.calculationtime.com/api/v1/convert/temperature' \
  -H 'Content-Type: application/json' \
  -d '{"value":32,"from":"fahrenheit","to":"celsius"}'
POST/api/v1/convert/areaArea unit conversion

Inputs: value, from, to

curl -X POST 'https://api.calculationtime.com/api/v1/convert/area' \
  -H 'Content-Type: application/json' \
  -d '{"value":1,"from":"acre","to":"square_meter"}'
POST/api/v1/convert/volumeVolume unit conversion

Inputs: value, from, to

curl -X POST 'https://api.calculationtime.com/api/v1/convert/volume' \
  -H 'Content-Type: application/json' \
  -d '{"value":1,"from":"gallon","to":"liter"}'
POST/api/v1/convert/speedSpeed unit conversion

Inputs: value, from, to

curl -X POST 'https://api.calculationtime.com/api/v1/convert/speed' \
  -H 'Content-Type: application/json' \
  -d '{"value":100,"from":"kmh","to":"mph"}'
POST/api/v1/convert/pressurePressure unit conversion

Inputs: value, from, to

curl -X POST 'https://api.calculationtime.com/api/v1/convert/pressure' \
  -H 'Content-Type: application/json' \
  -d '{"value":1,"from":"atmosphere","to":"psi"}'
POST/api/v1/convert/energyEnergy unit conversion

Inputs: value, from, to

curl -X POST 'https://api.calculationtime.com/api/v1/convert/energy' \
  -H 'Content-Type: application/json' \
  -d '{"value":1,"from":"kilowatt_hour","to":"joule"}'
POST/api/v1/convert/powerPower unit conversion

Inputs: value, from, to

curl -X POST 'https://api.calculationtime.com/api/v1/convert/power' \
  -H 'Content-Type: application/json' \
  -d '{"value":1,"from":"horsepower","to":"watt"}'
POST/api/v1/convert/data-storageData storage unit conversion

Inputs: value, from, to

curl -X POST 'https://api.calculationtime.com/api/v1/convert/data-storage' \
  -H 'Content-Type: application/json' \
  -d '{"value":1,"from":"gigabyte","to":"megabyte"}'
Colour and type (10) — HEX, RGB, HSL and CMYK, contrast ratios and luminance, tints and shades, rem sizes and line heights.
POST/api/v1/color/hex-to-rgbConvert HEX colour to RGB array

Inputs: hex

curl -X POST 'https://api.calculationtime.com/api/v1/color/hex-to-rgb' \
  -H 'Content-Type: application/json' \
  -d '{"hex":"#336699"}'
POST/api/v1/color/rgb-to-hexConvert RGB values to HEX colour

Inputs: r, g, b

curl -X POST 'https://api.calculationtime.com/api/v1/color/rgb-to-hex' \
  -H 'Content-Type: application/json' \
  -d '{"r":51,"g":102,"b":153}'
POST/api/v1/color/rgb-to-hslConvert RGB colour to HSL

Inputs: r, g, b

curl -X POST 'https://api.calculationtime.com/api/v1/color/rgb-to-hsl' \
  -H 'Content-Type: application/json' \
  -d '{"r":51,"g":102,"b":153}'
POST/api/v1/color/hsl-to-rgbConvert HSL colour to RGB and HEX

Inputs: h, s, l

curl -X POST 'https://api.calculationtime.com/api/v1/color/hsl-to-rgb' \
  -H 'Content-Type: application/json' \
  -d '{"h":210,"s":50,"l":40}'
POST/api/v1/color/contrast-ratioCalculate WCAG contrast ratio between two colours

Inputs: foreground, background

curl -X POST 'https://api.calculationtime.com/api/v1/color/contrast-ratio' \
  -H 'Content-Type: application/json' \
  -d '{"foreground":"#000000","background":"#ffffff"}'
POST/api/v1/color/luminanceCalculate WCAG relative luminance for a colour

Inputs: hex

curl -X POST 'https://api.calculationtime.com/api/v1/color/luminance' \
  -H 'Content-Type: application/json' \
  -d '{"hex":"#336699"}'
POST/api/v1/color/tint-shadeGenerate tint and shade palette steps from a base colour

Inputs: hex, steps

curl -X POST 'https://api.calculationtime.com/api/v1/color/tint-shade' \
  -H 'Content-Type: application/json' \
  -d '{"hex":"#336699","steps":5}'
POST/api/v1/color/cmyk-conversionApproximate CMYK values from RGB input

Inputs: r, g, b

curl -X POST 'https://api.calculationtime.com/api/v1/color/cmyk-conversion' \
  -H 'Content-Type: application/json' \
  -d '{"r":51,"g":102,"b":153}'
POST/api/v1/typography/px-to-remConvert pixel values to rem units

Inputs: px, base_px

curl -X POST 'https://api.calculationtime.com/api/v1/typography/px-to-rem' \
  -H 'Content-Type: application/json' \
  -d '{"px":24,"base_px":16}'
POST/api/v1/typography/line-heightCalculate proportional line height and type scale steps

Inputs: font_size_px, ratio, steps

curl -X POST 'https://api.calculationtime.com/api/v1/typography/line-height' \
  -H 'Content-Type: application/json' \
  -d '{"font_size_px":16,"ratio":1.5,"steps":5}'
Web and network tools (14) — IP addresses and CIDR ranges, user agents, query strings, slugs, ports, HTTP status, MIME types, UUID v5, MAC addresses, SHA hashes and Base64.
POST/api/v1/crypto/hash-sha256Compute SHA-256 hash for a small payload

Inputs: text

curl -X POST 'https://api.calculationtime.com/api/v1/crypto/hash-sha256' \
  -H 'Content-Type: application/json' \
  -d '{"text":"calculationtime"}'
POST/api/v1/crypto/hash-sha512Compute SHA-512 hash for a small payload

Inputs: text

curl -X POST 'https://api.calculationtime.com/api/v1/crypto/hash-sha512' \
  -H 'Content-Type: application/json' \
  -d '{"text":"calculationtime"}'
POST/api/v1/crypto/base64-encodeEncode text to Base64

Inputs: text

curl -X POST 'https://api.calculationtime.com/api/v1/crypto/base64-encode' \
  -H 'Content-Type: application/json' \
  -d '{"text":"calculationtime"}'
POST/api/v1/crypto/base64-decodeDecode Base64 text

Inputs: base64

curl -X POST 'https://api.calculationtime.com/api/v1/crypto/base64-decode' \
  -H 'Content-Type: application/json' \
  -d '{"base64":"Y2FsY3VsYXRpb250aW1l"}'
POST/api/v1/network/ip-parseParse IPv4 or IPv6 address metadata

Inputs: ip

curl -X POST 'https://api.calculationtime.com/api/v1/network/ip-parse' \
  -H 'Content-Type: application/json' \
  -d '{"ip":"192.168.1.10"}'
POST/api/v1/network/cidr-rangeCalculate IPv4 CIDR network, broadcast, and usable hosts

Inputs: cidr

curl -X POST 'https://api.calculationtime.com/api/v1/network/cidr-range' \
  -H 'Content-Type: application/json' \
  -d '{"cidr":"192.168.1.0/24"}'
POST/api/v1/network/user-agent-parseExtract browser, OS, and device class from a user-agent string

Inputs: user_agent

curl -X POST 'https://api.calculationtime.com/api/v1/network/user-agent-parse' \
  -H 'Content-Type: application/json' \
  -d '{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 Chrome/120 Safari/537.36"}'
POST/api/v1/network/query-string-parseEncode or decode URL query strings

Inputs: mode, query

curl -X POST 'https://api.calculationtime.com/api/v1/network/query-string-parse' \
  -H 'Content-Type: application/json' \
  -d '{"mode":"decode","query":"a=1&b=two"}'
POST/api/v1/network/slug-sanitizeNormalize arbitrary text into a URL-safe slug

Inputs: text

curl -X POST 'https://api.calculationtime.com/api/v1/network/slug-sanitize' \
  -H 'Content-Type: application/json' \
  -d '{"text":"Café Invoice #42!"}'
POST/api/v1/network/port-lookupLook up standard TCP/UDP port service names

Inputs: port

curl -X POST 'https://api.calculationtime.com/api/v1/network/port-lookup' \
  -H 'Content-Type: application/json' \
  -d '{"port":443}'
POST/api/v1/network/http-status-lookupLook up HTTP status phrase and status class

Inputs: code

curl -X POST 'https://api.calculationtime.com/api/v1/network/http-status-lookup' \
  -H 'Content-Type: application/json' \
  -d '{"code":429}'
POST/api/v1/network/mime-lookupResolve file extension to MIME type

Inputs: extension

curl -X POST 'https://api.calculationtime.com/api/v1/network/mime-lookup' \
  -H 'Content-Type: application/json' \
  -d '{"extension":"json"}'
POST/api/v1/network/uuid-v5Generate deterministic name-based UUID v5

Inputs: namespace, name

curl -X POST 'https://api.calculationtime.com/api/v1/network/uuid-v5' \
  -H 'Content-Type: application/json' \
  -d '{"namespace":"6ba7b810-9dad-11d1-80b4-00c04fd430c8","name":"calculationtime.com"}'
POST/api/v1/network/mac-formatNormalize and validate MAC address formatting

Inputs: mac

curl -X POST 'https://api.calculationtime.com/api/v1/network/mac-format' \
  -H 'Content-Type: application/json' \
  -d '{"mac":"aabb.ccdd.eeff"}'
Health (5) — BMI, BMR, daily energy needs, macros and running pace.
POST/v1/health/bmiBody Mass Index and category classification

Inputs: unit, weight_kg, height_cm

curl -X POST 'https://api.calculationtime.com/v1/health/bmi' \
  -H 'Content-Type: application/json' \
  -d '{"unit":"metric","weight_kg":70,"height_cm":175}'
POST/v1/health/bmrBasal Metabolic Rate using Mifflin-St Jeor

Inputs: unit, weight_kg, height_cm, age, sex

curl -X POST 'https://api.calculationtime.com/v1/health/bmr' \
  -H 'Content-Type: application/json' \
  -d '{"unit":"metric","weight_kg":70,"height_cm":175,"age":35,"sex":"male"}'
POST/v1/health/tdeeTotal Daily Energy Expenditure from BMR and activity multiplier

Inputs: unit, weight_kg, height_cm, age, sex, activity_level

curl -X POST 'https://api.calculationtime.com/v1/health/tdee' \
  -H 'Content-Type: application/json' \
  -d '{"unit":"metric","weight_kg":70,"height_cm":175,"age":35,"sex":"male","activity_level":"moderate"}'
POST/v1/health/macro-splitProtein, carbs, and fat grams from calories and macro percentages

Inputs: calories, protein_percent, carbs_percent, fat_percent

curl -X POST 'https://api.calculationtime.com/v1/health/macro-split' \
  -H 'Content-Type: application/json' \
  -d '{"calories":2000,"protein_percent":30,"carbs_percent":40,"fat_percent":30}'
POST/v1/health/pace-calculatorRunning or walking pace and speed from distance and duration

Inputs: distance, unit, minutes

curl -X POST 'https://api.calculationtime.com/v1/health/pace-calculator' \
  -H 'Content-Type: application/json' \
  -d '{"distance":5,"unit":"km","minutes":25}'
Statistics (1) — Descriptive statistics for a list of numbers.
POST/v1/stats/summaryDescriptive statistics for a numeric dataset

Inputs: values

curl -X POST 'https://api.calculationtime.com/v1/stats/summary' \
  -H 'Content-Type: application/json' \
  -d '{"values":[1,2,2,4,9]}'
Observatory sharing (2) — Store an orrery setting under a private link that lasts 30 days, and read it back.
POST/v1/observatory/shareCreate private Observatory share token

Inputs: poster, date, ttl_days

curl -X POST 'https://api.calculationtime.com/v1/observatory/share' \
  -H 'Content-Type: application/json' \
  -d '{"poster":"moment","date":"2026-08-01","ttl_days":7}'
GET/v1/observatory/share/{token}Resolve private Observatory share token

Inputs: token

curl 'https://api.calculationtime.com/v1/observatory/share/<token>'

Limits and errors

What to expect when something goes wrong

The contract

Use the API contract in your own tools

The OpenAPI 3.1 contract describes every address, input and example in a machine-readable file. Open it in Postman or Insomnia, use it to generate a client, or check a request before sending it. The current service state is available at /v1/status.

Questions

Questions developers ask

Do I need a key to use the CalculationTime API?

No. There is no key, sign-up or account. You can call the API from a terminal, a server or a web page.

How many requests can I make?

Up to 60 a minute from each address. The reply headers show the limit, the requests left and the reset time. If you reach the limit, wait until the minute resets.

Can I call the API straight from a web page?

Yes. The API accepts requests from any website, which is how the console and the meeting lesson on this page work.

Does it handle daylight saving?

Yes. Ask /v1/time for a place with at= set to the moment you care about, and the reply gives the offset and is_dst for that moment, not for today.

How do I know a reference table has changed?

Each table reply includes dataset_version and source. Save the version with your copy. Refresh the table when that version changes.

What does an error look like?

Errors use one shape: {"error": {"code": "...", "message": "..."}}. The HTTP status points to the cause: 400 for bad input, 404 for a wrong address and 429 for too many requests.

Is there a machine-readable description?

Yes. The OpenAPI 3.1 contract lists every operation and input. Use it to inspect the API, validate requests or generate a client.