An electrical ratchet wrench has a body, a motor, a battery set, a switch, a
planet
gear assembly, a connecting collar, a head and a ratcheting device. The motor is
received in the body and has an output shaft with a pinion. The battery set is
detachably received in the body and is electrically connected to the motor. The
switch is electrically connected between the motor and the battery set. The planet
gear assembly is received in the body and has a rotating base, a stub, multiple
planet gears and a stationary collar. The connecting collar securely holds the
stationary collar in the connecting collar. The ratcheting device is received in
the head for driving a fastener to rotate and has a driven shaft connected to the
stub on the rotating base. Accordingly, a cordless electrical ratchet wrench is
provided and is convenient in use.