An information processing program executed by a computer of an information processing apparatus which performs predetermined information processing in accordance with an attitude of an input member having imaging means and an attitude sensor, the information processing program causing the computer to function as: first position calculation means (14, S2) configured to calculate a first position according to the attitude of the input member, which position is a pointing position of the input member which is on a plane corresponding to a screen of the display device, by using imaging information based on an image including a predetermined imaging target captured by the imaging means; second position calculation means (14, S3) configured to calculate a second position according to the attitude of the input member, which position is a pointing position of the input member which is on a plane corresponding to a screen of the display device, by using a result of detection of the attitude sensor; and processing execution means (14, S5) configured to perform the predetermined information processing by using a control position based on at least the first position, when the first position is calculable, and perform the predetermined information processing by using a control position based on at least the second position, when the first position is incalculable, wherein when the state where the first position is calculable has switched to the state where the first position is incalculable, the processing execution means (14, S5) performs the predetermined information processing by using a control position based on the first position before the switching and the second position after the switching, characterized in that when the state where the first position is calculable has switched to the state where the first position is incalculable, the processing execution means (14, S5) specifies a correction process for correcting the second position so that the values of the first position and the second position immediately before the switching are equal to each other, and performs the predetermined information processing by using a control position obtained by performing the correction process on the second position after the switching. first position calculation means (14, S2) configured to calculate a first position according to the attitude of the input member, which position is a pointing position of the input member which is on a plane corresponding to a screen of the display device, by using imaging information based on an image including a predetermined imaging target captured by the imaging means; second position calculation means (14, S3) configured to calculate a second position according to the attitude of the input member, which position is a pointing position of the input member which is on a plane corresponding to a screen of the display device, by using a result of detection of the attitude sensor; and processing execution means (14, S5) configured to perform the predetermined information processing by using a control position based on at least the first position, when the first position is calculable, and perform the predetermined information processing by using a control position based on at least the second position, when the first position is incalculable, wherein when the state where the first position is calculable has switched to the state where the first position is incalculable, the processing execution means (14, S5) performs the predetermined information processing by using a control position based on the first position before the switching and the second position after the switching, characterized in that when the state where the first position is calculable has switched to the state where the first position is incalculable, the processing execution means (14, S5) specifies a correction process for correcting the second position so that the values of the first position and the second position immediately before the switching are equal to each other, and performs the predetermined information processing by using a control position obtained by performing the correction process on the second position after the switching.