A line-of-sight detection method executed by a computer, the line-of-sight detection method comprising: detecting (S11) an eye region of a subject from an image; determining (S14), based on a brightness change in a detection region which is located in the eye region and has a line shape or a band shape, whether a position of a boundary between a pupil and an iris is detected in the detection region ; executing (S16), in accordance with a result of the determining, both of a first processing in which a position of a center of the pupil is detected based on the boundary between the pupil and the iris , the boundary between the pupil and the iris being detected using a plurality of first templates (271a to 271c), and a second processing in which the position of the center of the pupil is detected based on the boundary between the iris and the sclera, the boundary between the iris and the sclera being detected using a plurality of second templates (272a to 272c) different from the first templates (271a to 271c); weighting a first processing result obtained through the first processing more than a second processing result obtained through the second processing when it has been determined (S14) that the position of the boundary is detected in the detection region ; weighting the second processing result obtained through the second processing more than the first processing result obtained through the first processing when it has been determined (S14) that the position of the boundary is not detected in the detection region ; and detecting (S17) a line of sight of the subject based on the position of the center of the pupil detected by the first processing and the second processing. detecting (S11) an eye region of a subject from an image; determining (S14), based on a brightness change in a detection region which is located in the eye region and has a line shape or a band shape, whether a position of a boundary between a pupil and an iris is detected in the detection region ; executing (S16), in accordance with a result of the determining, both of a first processing in which a position of a center of the pupil is detected based on the boundary between the pupil and the iris , the boundary between the pupil and the iris being detected using a plurality of first templates (271a to 271c), and a second processing in which the position of the center of the pupil is detected based on the boundary between the iris and the sclera, the boundary between the iris and the sclera being detected using a plurality of second templates (272a to 272c) different from the first templates (271a to 271c); a first processing in which a position of a center of the pupil is detected based on the boundary between the pupil and the iris , the boundary between the pupil and the iris being detected using a plurality of first templates (271a to 271c), and a second processing in which the position of the center of the pupil is detected based on the boundary between the iris and the sclera, the boundary between the iris and the sclera being detected using a plurality of second templates (272a to 272c) different from the first templates (271a to 271c); weighting a first processing result obtained through the first processing more than a second processing result obtained through the second processing when it has been determined (S14) that the position of the boundary is detected in the detection region ; weighting the second processing result obtained through the second processing more than the first processing result obtained through the first processing when it has been determined (S14) that the position of the boundary is not detected in the detection region ; and detecting (S17) a line of sight of the subject based on the position of the center of the pupil detected by the first processing and the second processing. <EOS>