A device for assisting driving for a railway vehicle, comprising means for determining a target speed (V c), including: - means for comparing an instantaneous speed (V i) of the railway vehicle with the target speed (V c) or with an interval surrounding the target speed, and - means for indicating driving instructions intended for a driver of the railway vehicle, said driving instructions including instructions (25, 26, 28, 30) for modifying the instantaneous speed (V i) with view to bringing it closer to the target speed (V c), and in that the target speed is determined on a track segment in one of the following ways: - the target speed is predetermined, by calculation beforehand, taking into account the energy consumption of the railway vehicle and the schedules which have to be observed by this railway vehicle, and preferably features of the vehicle, features of the relevant track segment and environmental conditions; - the target speed is calculated in real time, taking into account the energy consumption of the railway vehicle and the schedules which have to be observed by this railway vehicle, and preferably features of the vehicle, features of the relevant track segment and environmental conditions; or - the target speed is defined by learning means recording at each travel, the speed of the vehicle on the relevant track segment, and then by selecting the most adapted speed from among those recorded on this track segment characterized in that the comparison means also compare the instantaneous speed (V i) with a maximum speed (V max), and the means for indicating driving instructions are configured for indicating an imperative instruction for reducing the speed when the instantaneous speed (V i) is greater than the maximum speed (V max), and in that the maximum speed (V max) is predetermined for each track segment and stored in a database, provided in real time by a centralized control center, or by milestones positioned along the railway track. - means for comparing an instantaneous speed (V i) of the railway vehicle with the target speed (V c) or with an interval surrounding the target speed, and - means for indicating driving instructions intended for a driver of the railway vehicle, said driving instructions including instructions (25, 26, 28, 30) for modifying the instantaneous speed (V i) with view to bringing it closer to the target speed (V c), - the target speed is predetermined, by calculation beforehand, taking into account the energy consumption of the railway vehicle and the schedules which have to be observed by this railway vehicle, and preferably features of the vehicle, features of the relevant track segment and environmental conditions; - the target speed is calculated in real time, taking into account the energy consumption of the railway vehicle and the schedules which have to be observed by this railway vehicle, and preferably features of the vehicle, features of the relevant track segment and environmental conditions; or - the target speed is defined by learning means recording at each travel, the speed of the vehicle on the relevant track segment, and then by selecting the most adapted speed from among those recorded on this track segment