Skyhawk 172/Cutlass 172
Flight Crew Commercial; Flight Crew Flight Instructor; Flight Crew Instrument; Flight Crew Multiengine
Flight Crew Last 90 Days 120; Flight Crew Total 400; Flight Crew Type 300
Distraction; Situational Awareness
Conflict NMAC; Deviation - Altitude Overshoot; Deviation / Discrepancy - Procedural Clearance
Air Traffic Control Issued Advisory / Alert; Flight Crew Took Evasive Action
Human Factors; Procedure
Instructor and student were climbing out on SID when instructed to climb to 4000 ft. ATC advised traffic 12-1 o'clock 1000 ft above. While watching for that traffic the student accidentally climbed through the assigned altitude and came dangerously close to the other aircraft; enough for ATC to get an alert and issue a pilot deviation and phone number to call when back on the ground.
C172 instructor pilot reported an altitude deviation and a NMAC after the student pilot inadvertently climbed above the assigned altitude.