Narrative:

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.

Google
 

Original NASA ASRS Text

Title: C172 instructor pilot reported an altitude deviation and a NMAC after the student pilot inadvertently climbed above the assigned altitude.

Narrative: 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.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.