We compare forces resisting DNA packaging and forces driving DNA ejection in bacteriophage phi29 with theoretical predictions. Ejection of DNA from prohead-motor complexes is triggered by heating complexes after in vitro packaging and force is inferred from the suppression of ejection by applied osmotic pressure. Ejection force from 0% to 80% filling is found to be in quantitative agreement with predictions of a continuum mechanics model that assumes a repulsive DNA-DNA interaction potential based on DNA condensation studies and predicts an inverse-spool conformation. Force resisting DNA packaging from ∼80% to 100% filling inferred from optical tweezers studies is also consistent with the predictions of this model. The striking agreement with these two different measurements suggests that the overall energetics of DNA packaging is well described by the model. However, since electron microscopy studies of phi29 do not reveal a spool conformation, our findings suggest that the spool model overestimates the role of bending rigidity and underestimates the role of intrastrand repulsion. Below ∼80% filling the inferred forces resisting packaging are unexpectedly lower than the inferred ejection forces, suggesting that in this filling range the forces are less accurately determined or strongly temperature dependent.