A surgical circular stapler has a handle assembly, a shaft, a stapling assembly, a motor, a drive assembly, and a firing assembly. The shaft extends distally from the handle assembly. The stapling assembly is secured to a distal end of the shaft. Longitudinal translation of the firing assembly causes the stapling assembly to drive a plurality of staples in a circular array to secure two lumens of tissue together. The stapling assembly may further drive a blade to sever any excess tissue interior of the circular array of staples. The motor is operable to rotate the drive assembly to thereby translate the firing assembly. A resilient member biases the firing assembly proximally. Through cooperation between the firing assembly and the resilient member, the firing assembly is driven distally and proximally to complete a firing stroke in response to rotation of the drive assembly through a single revolution. A cam assembly is coupled to the motor and to the firing assembly. The motor rotates the cam assembly to drive the firing assembly with a varying longitudinal force.