# Billing

emulator.wtf has minute-precision billing, invoiced on a monthly basis. Here’s a few examples how the total cost of a test is calculated.

## Test duration calculation

**Only the actual test runtime is measured with the purpose of billing.** Test
preparation or teardown, including but not limited to uploading APKs, starting
devices, pushing files or APKs to the device, pulling files after the test
has finished or tearing down the device **are not billed**.

The test duration is measured at a minute precision and always rounded up
(`ceil`

) to the next minute. If a test takes *exactly* a whole number of minutes
then it is still rounded up. A few examples:

- A test taking 165.813 seconds is billed as 3 minutes
- A very fast test taking 1.169 seconds is billed as 1 minute
- A test taking exactly 240.000 seconds is billed as 5 minutes

## Multiple devices and/or shards

Every device-shard combination is rounded up separately. For example, a test
having two shards and two device models (`4`

separate emulators in total) and
running for `150 seconds`

on each emulator will be billed according to
`3 * 4`

- 12 minutes in total.

## Billing cycle

Our current billing cycle is one calendar month. At the end of the billing cycle, or minutes consumed are added up, divided by 60, multiplied by your hourly price and then rounded up to the nearest cent precision.

For example, if you consumed `95 test minutes`

in June and have an hourly price
of `$2 per emulatorhr`

then the number on the final invoice at the end of the
billing cycle will be `95 / 60 * 2`

rounded to the cent precision, $3.17.