A door closer with an automated calibration mode is disclosed. The door closer that can be self powered and includes a control unit to intelligently control a valve within the door closer to vary the operating characteristics of the door closer as needed. The control unit includes a calibration mode that can be invoked to match the control unit to the mechanical door closer assembly. A plurality of positional values being output encoders coupled to an arm of the door closer and the motor for the valve can be determined. The positional values from the encoders and the positions that they indicate can then be stored in a memory within the controller for use during normal operation of the door closer.