Provided herewith are methods and apparatus for optimizing an atrioventricular (AV) pacing delay interval based upon ECG-based optimization is calculated as a linear function of P-wave duration, sensed PR (intrinsic) interval, sensed or paced QRS duration and heart rate. Since the relationship among these parameters is linear, once the coefficients are solved (which can be any value, including null) with reference to a known optimized AV interval (AVopt) such as from an echocardiographic study, an AVopt value can be dynamically adjusted in an ambulatory subject. The various combinations of values can be loaded into a look up table or calculated automatically. And, since some of the parameters do not typically change much over time they can be determined acutely and fed into the equation while the other values can be measured frequently. The parameter values can be measured by an implantable medical device such as a dual- or triple-chamber pacemaker.