# _uptime.is_ SLA calculator _informal_ specification The _uptime.is_ SLA calculator has been developed on an ad-hoc basis in response to specific needs of its creator. ## Simple SLA calculator In its most simple form, the calculator outputs downtime duration in hours, minutes and seconds given a specified uptime percentage. The SLA uptime percentage may be specified in the URL, or as a GET/POST form parameter named `sla` (the form parameter having precedence): * `https://uptime.is/` * `https://uptime.is/?sla=` The calculator outputs acceptable daily, weekly, monthly, quarterly and yearly downtime durations given the provided SLA uptime percentage. For convenience, special URLs are provided for _two--nine nines_, e.g. * `https://uptime.is/two-nines` * [...] * `https://uptime.is/nine-nines` ## Complex SLA calculator Simple SLA calculator described above assumes 24/7 uptime requirement (with certain approximations further documented in ). In real world, the requirements are often more relaxed, e.g. 8 hours on working days. To accommodate for this scenario, the SLA calculator supports _complex_ mode, where it is possible to specify uptime requirement for each day of week. The SLA uptime percentage is specified in a GET/POST form parameter named `sla` and the durations in GET/POST form parameter called `dur` and repeated for each day of week (i.e. 7 times and defaulting to 24, if not provided): * `https://uptime.is/complex?sla=&dur=&[...]&dur=` The calculator outputs acceptable weekly, monthly, quarterly and yearly downtime durations given the provided SLA uptime percentage. ## Reverse SLA calculator Reverse SLA calculator performs the opposite operation, and converts downtime duration into corresponding SLA uptime percentage. The downtime duration may be provided as a number of seconds (e.g. `42`) or as a combination of hours, minutes and/or seconds of downtime using the `h`, `m` or `s` unit (e.g. `13m 37s`). The reverse SLA calculator accepts the durations in the same way as the complex SLA calculator. The downtime duration is specified in a GET/POST form parameter named `down` and the durations in GET/POST form parameter called `dur` and repeated for each day of week (i.e. 7 times and defaulting to 24, if not provided): * `https://uptime.is/reverse?down=&dur=&[...]&dur=` The calculator outputs SLA uptime percentage which would allow the specified downtime with weekly, monthly, quarterly and yearly uptime calculations.