Miss by a mile

Fail to do something by a great amount, to fail to hit something by a great distance.

The soccer player seemed almost certain to score a goal but actually he missed by a mile.