An automatic gear-shifting bicycle with optimal shift timing, comprising: a bicycle body comprising a bottom bracket bearing axle, two cranks respectively coupled to said bottom bracket bearing axle, a pedal supported on each said crank, and a derailleur; a power supply module installed in said bicycle body; a microcomputer electrically coupled to said power supply module; and a gear shifting control driver electrically coupled to said microcomputer, and controllable by said microcomputer to drive said derailleur to change gears; wherein it is characterized in that the automatic gear-shifting bicycle further comprises: a pedal position sensor module installed in said bicycle body corresponding to at least one said crank and electrically coupled to said microcomputer for enabling said microcomputer to determine the angular position of at least one said crank and the pedaling direction of at least one said crank to be forward pedaling or backward pedaling; wherein when a person riding the automatic gear-shifting bicycle is pedaling said pedals, said microcomputer determines the optimal shift timing subject to one of the conditions: sensing the angular position of at least one said crank at a predetermined location during forward pedaling and the related time point, and enabling said microcomputer to calculate, subject to the sensed angular position and time point, the time point in which at least one said crank will pass the pedaling dead point in the next time, and using the calculated time point as the optimal shift timing; or sensing the pedaling speed of at least one crank during forward pedaling, and determining the time point in which the pedaling speed is below a predetermined speed value to be the optimal shift timing and ignoring the time point of the pedaling dead point. a bicycle body comprising a bottom bracket bearing axle, two cranks respectively coupled to said bottom bracket bearing axle, a pedal supported on each said crank, and a derailleur; a power supply module installed in said bicycle body; a microcomputer electrically coupled to said power supply module; and a gear shifting control driver electrically coupled to said microcomputer, and controllable by said microcomputer to drive said derailleur to change gears; wherein it is characterized in that the automatic gear-shifting bicycle further comprises: a pedal position sensor module installed in said bicycle body corresponding to at least one said crank and electrically coupled to said microcomputer for enabling said microcomputer to determine the angular position of at least one said crank and the pedaling direction of at least one said crank to be forward pedaling or backward pedaling; wherein when a person riding the automatic gear-shifting bicycle is pedaling said pedals, said microcomputer determines the optimal shift timing subject to one of the conditions: sensing the angular position of at least one said crank at a predetermined location during forward pedaling and the related time point, and enabling said microcomputer to calculate, subject to the sensed angular position and time point, the time point in which at least one said crank will pass the pedaling dead point in the next time, and using the calculated time point as the optimal shift timing; or sensing the pedaling speed of at least one crank during forward pedaling, and determining the time point in which the pedaling speed is below a predetermined speed value to be the optimal shift timing and ignoring the time point of the pedaling dead point. a pedal position sensor module installed in said bicycle body corresponding to at least one said crank and electrically coupled to said microcomputer for enabling said microcomputer to determine the angular position of at least one said crank and the pedaling direction of at least one said crank to be forward pedaling or backward pedaling; wherein when a person riding the automatic gear-shifting bicycle is pedaling said pedals, said microcomputer determines the optimal shift timing subject to one of the conditions: sensing the angular position of at least one said crank at a predetermined location during forward pedaling and the related time point, and enabling said microcomputer to calculate, subject to the sensed angular position and time point, the time point in which at least one said crank will pass the pedaling dead point in the next time, and using the calculated time point as the optimal shift timing; or sensing the pedaling speed of at least one crank during forward pedaling, and determining the time point in which the pedaling speed is below a predetermined speed value to be the optimal shift timing and ignoring the time point of the pedaling dead point.