Formal charge = total number of valence electrons
- total number of non-bonding electrons −21× total number of bonding electrons
As for structure
For Ist and 3rd nitrogen atom
Formal charge =5−4−21×4=−1
For middle nitrogen atom
Formal charge =5−0−21×8=+1