var numberOfChecked = $('input:checkbox:checked').length; var totalCheckboxes = $('input:checkbox').length; var numberNotChecked = totalCheckboxes - numberOfChecked;