A guidance system for assisting with the insertion of a needle or other medical component into the body of a patient is disclosed. The guidance system utilizes ultrasound imaging or other suitable imaging technology. In one embodiment, the guidance system comprises an imaging device including a probe for producing an image of an internal body portion target, such as a vessel. One or more sensors are included with the probe. The sensors sense a detectable characteristic related to the needle, such as a magnetic field of a magnet included with the needle. The system includes a processor that uses data relating to the detectable characteristic sensed by the sensors to determine a position and/or orientation of the needle in three spatial dimensions. In yet another embodiment, systems and methods for determining the length of the needle to be guided by the guidance system are disclosed.