Basically I have a select statement that checks the value of 3 checkboxes from a form for all records . The possible values are 0 for unchecked or 1 for checked $sql = "SELECT setup_form, application, contract FROM users"; After I fetch array how can I calculate the % of how many records have all the checkbox fields checked (or 1 in all fields) So for example 75% of users have submitted all documents Thnks