Knee joint impedance varies substantially during physiological gait. Quantifying this modulation is critical for the design of transfemoral prostheses that aim to mimic physiological limb behavior. Conventional methods for quantifying joint impedance typically involve perturbing the joint in a controlled manner, and describing impedance as the dynamic relationship between applied perturbations and corresponding joint torques. These experimental techniques, however, are difficult to apply during locomotion without impeding natural movements. In this paper, we propose a method to estimate the elastic component of knee joint impedance that depends on muscle activation, often referred to as active knee stiffness. The method estimates stiffness using a musculoskeletal model of the leg and a model for activation-dependent short-range muscle stiffness. Muscle forces are estimated from measurements including limb kinematics, kinetics and muscle electromyograms. For isometric validation, we compare model estimates to measurements involving joint perturbations; measured stiffness is 17% lower than model estimates for extension, and 42% lower for flexion torques. We show that sensitivity of stiffness estimates to common approaches for estimating muscle force is small in isometric conditions. We also make initial estimates of how knee stiffness is modulated during gait, illustrating how this approach may be used to obtain parameters relevant to the design of transfemoral prostheses.