Formula for calculating magnetic field due to infinite wire can be derived from the formula of magnetic field due to finite wire.