Bond order according to Lewis theory: The bond order is defined as the number of chemical bonds (shared electron pairs) between two atoms in a molecule.
Examples: The bond order in $H_2, F_2, Cl_2,$ and $HCl$ is $1$. In $O_2$,the bond order is $2$,and in $N_2$,it is $3$,because the number of shared electron pairs between the two atoms is $2$ and $3$ respectively.
Bond order according to Molecular Orbital $(MO)$ theory: The formula is $\text{Bond Order} = \frac{1}{2}(N_b - N_a)$.
Where:
$N_b = \text{Total number of bonding electrons in } BMO$.
$N_a = \text{Total number of antibonding electrons in } ABMO$.
Examples using $MO$ theory:
$1.$ For $H_2$: $\text{Bond Order} = \frac{1}{2}(2 - 0) = 1$.
$2.$ For $F_2, Cl_2, Br_2$: $\text{Bond Order} = \frac{1}{2}(10 - 8) = 1$.
$3.$ For $O_2$: $\text{Bond Order} = \frac{1}{2}(10 - 6) = 2$.
$4.$ For $N_2$: $\text{Bond Order} = \frac{1}{2}(10 - 4) = 3$.