# Apdex

Apdex is an industry-standard method for reporting and comparing application performance in terms of end user experience. Apdex uses a simple formula to represent user satisfaction as a single number, your apdex ‘score’, which APM returns as an easy-to-read, color-coded percentage.

apdex

_{t}= (Satisfied Count + Tolerating Count / 2) / Total Samples

In APM, ‘count’ is the number of milestones that can be classified as ‘satisfied’ or ‘tolerating’ based on the time they take to complete. Apdex scores always represent the time period over which the samples were collected, as indicated by the subscript ‘t’, and in APM, the sample period is 2 hours. This means that every apdex score you see is calculated based on milestone completion times from the last two hours. Apdex scores are calculated for every milestone, web path, and web application. Let’s run through each one:

- Milestone apdex
- On the ‘edit user actions’ page you’ll see ‘apdex thresholds’ which by default states: ‘The user is satisfied when a milestone completes in 4 seconds or under, and will tolerate completion times 16 seconds or over.’ These thresholds will be applied to each milestone in the script unless you select ‘per milestone’. You might want to do this if your milestones prove to take significantly different amounts of time to complete. Notice that the value of tolerating is 4 times the value of satisfied; the apdex formula assumes this ratio, keep this in mind if you decide to customize your thresholds. So to calculate the apdex score for a milestone, collect its completion times from all transactions within the last 2 hours, categorize each of them into ‘satisfied’ or ‘tolerating’, ignore any ‘unsatisfied’, and then compute the apdex score using the formula above.
- Web path apdex
- To calculate the apdex score for a web path, collect the completion times for each milestone from all transactions within the last 2 hours, categorize each of them into ‘satisfied’ or ‘tolerating’, ignore any ‘unsatisfied’, and then compute the apdex score using the formula above.
- Web app apdex
- To calculate the apdex score for a web app, collect the completion times for each milestone from all transactions within the last 2 hours for all paths in the application definition, categorize each of them into ‘satisfied’ or ‘tolerating’, ignore any ‘unsatisfied’, and then compute the apdex score using the formula above.

**Setting good apdex thresholds:** There’s no one-size-fits-all for setting thresholds, but here are a few tips.