Total 5xx/4xx % calculation

How can I calculate %of 5XX requests based on a total number of requests…
like in last 5 min - total 100 requests done, and 5XX- 20
so 5XX ratio should be 20%

source- cloud watch

Use cloudwatch math expressions. Use search forum function and you will find topics about it, e. g. Disappointing First Experience with Grafana - can't do simple math? - #8 by jangaraj