The dipole moment, a product of charge difference (q) and the distance (d) between the centres of positive and negative charges (µ = q x d), is also directional. The direction is indicated by an arrowhead, which points towards the most electronegative atom, representing the direction of the dipole moment.
Between NF3 and NH3, the N-F bond must have a higher charge difference due to the higher electronegativity of the Fluorine atom as compared to the Hydrogen atom. Also, when considering the distance between them, it is observed that the N-F bond distance of 137 pm is higher than the N-H bond distance of 100 pm.
These two factors should support a higher dipole moment for NF3. However, the dipole moment of NF3 is only 0.24 Debye, and the observed value is 1.46 Debye for NH3.
Such a discrepancy is attributed to the molecular shape, a crucial determinant in molecular dipole moment calculations. In the above observations, the thought was solely on individual bonds without considering how a molecule’s shape can impact the total molecular dipole moment. Since a molecular dipole moment is a vector quantity that considers both direction and magnitude.
Both molecules have a trigonal pyramidal shape; however, the direction of the bond moment changes according to the orientation of the electronegative atom. In addition, the calculation must also consider the contribution of the lone pair.
So, the net dipole moment is no longer only the sum of all the individual bond dipole moments.
Molecular Dipole Moment of NH3 molecule
The direction of the N-H bond vector lies towards the electronegative Nitrogen, and the positive end is at the Hydrogen.
The orbital lone pair is more electronegative than the Nitrogen and pulls the electron cloud towards itself—so the vector points in the lone pair's direction.
The resulting sum of all the individual N-H and N-LP (lone pair) bond moments is additive, which leads to a significant net dipole moment.

Molecular Dipole Moment of NF3 molecule
The direction of the bond moment for the N-F bond is more toward the electronegative Fluorine. The positive end of the vector faces the Nitrogen.
Again, the vector points toward the lone pair for the N-LP bond as it is more electronegative than the Nitrogen.
Here, one N-F bond moment cancels the N-LP bond moment as they are oriented in opposite directions. This lowers the molecular dipole moment; therefore, the net dipole moment for NF3 is less.
The above excerpt supports the chapter Dipole Moment in CurlyArrows' Introductory Organic Chemistry Course. Preview the Book.
Related Reading: What is Electronegativity?