Toolvito

Works on this device

API Availability Calculator

See how much downtime an availability target such as 99.9% allows, how available your API was, and how the availability of its parts adds up. Everything is worked out with exact fractions in this page.

Enter your values

The downtime that an availability target such as 99.9% allows in a day, a week, a month, a quarter and a year.

Your values

An uptime percentage such as 99.9, often called "three nines". It is your own target or the one in your service level agreement (SLA).

A quarter is counted as a year ÷ 4.

Agreements count a month in different ways. Check yours.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

How to use this calculator

  1. Choose what you want to work out: the downtime a target allows, the availability from a downtime, the availability from request counts, or the combined availability of components.
  2. Type the numbers you know. For a target, you can also pick a common one such as 99.9% or 99.99%.
  3. Choose the length of a month and a year. Agreements count them in different ways, so the result says which lengths it used.
  4. Choose Calculate. You can change the unit of a time, copy the result, print it or download it as a CSV file.

The formulas

  • Downtime allowed = (1 − target ÷ 100) × length of the period.
  • Availability from downtime = (length of the period − downtime) ÷ length of the period × 100.
  • Availability from requests = (requests − failed requests) ÷ requests × 100. The failures a target allows = (1 − target) × requests, rounded down.
  • Components in series (every one must work): A = A1 × A2 × ...
  • Components in parallel (one is enough): A = 1 − (1 − A1) × (1 − A2) × ...
  • Number of nines = −log10(1 − A). 99.9% is 3 nines.
  • A quarter is a year ÷ 4. A month is 28, 29, 30 or 31 days, or a year ÷ 12, as you choose. A year is 365, 366 or 365.2425 days.

Worked example

A target of 99.9% leaves 0.1% of the time for downtime. In a 30-day month that is 0.001 × 2,592,000 seconds = 2,592 seconds, or 43 minutes 12 seconds. In a year of 365 days it is 31,536 seconds, or 8 hours 45 minutes 36 seconds, and in a quarter of 91.25 days it is 2 hours 11 minutes 24 seconds.

An API that answered 2,500,000 requests, of which 1,800 failed, had an availability of 2,498,200 ÷ 2,500,000 = 99.928%. A target of 99.9% would allow 2,500 failed requests.

An API gateway of 99.95%, two app servers of 99.5% in parallel, and a database of 99.9% give 0.9995 × (1 − 0.005 × 0.005) × 0.999 = 99.84755374875%. That is about 13 hours 21 minutes of downtime in a year of 365 days.

Limits you should know

  • The rules for series and parallel assume that the components fail independently of each other. A shared cause, such as one network, one region or one software fault, makes the real availability lower.
  • The tool does not measure your API and does not test whether a website or a domain name is available. It works only with the numbers you type.
  • Agreements may leave planned maintenance out, count only working hours, or count some answers (such as 429 Too Many Requests) as not failed. Use the numbers your agreement counts.
  • For a month by its calendar name, a budget left after outages, and spare copies of a component, use the Downtime Allowance Calculator. For an uptime from a log of incidents or from monitoring checks, use the Uptime Percentage Calculator.

Related tools