The invention discloses an automatic gearbox which comprises an input shaft, a first planetary gear mechanism, a second planetary gear mechanism, a third planetary gear mechanism, an output shaft, a first clutch, a second clutch, a third clutch, a fourth clutch and a second brake. A first gear ring is connected with the input shaft, a first planetary frame is fixedly connected with a gearbox shell, a second planetary frame is fixedly connected with a third planetary frame, the output shaft is fixedly connected with a second gear ring and a third gear ring and parallel to the input shaft, the first clutch is freely connected with the input shaft and a third sun gear, the second clutch is freely connected with the input shaft and a second sun gear, the third clutch is freely connected with a first sun gear and the second sun gear, the fourth clutch is freely connected with the first sun gear and the second planetary frame, the second planetary frame is freely fixed to the gearbox shell by the aid of the second brake, and transmission gears are determined according to the connecting state of two fastening mechanisms. The automatic gearbox is more compact in structure and wider in speed ratio range, and is provided with more gears and at most provided with twelve forward gears and one reverse gear.