We describe a mathematical model for the magnetic phase shift of a cylindrical nanowire. We discuss electron holography experiments on magnetic nanowires. We obtain an accurate fit of the measured magnetic phase shift profile. We extract the magnetic induction of the nanowire from the phase shift model. The magnetic induction of 1.7 T agrees well with literature results.