We present an analytic expression for the stress tensor in a solid within the linearized-augmented plane-wave method, with special emphasis on the method specific corrections. From this formalism we derive a simple formula for the pressure, which can be calculated very quickly on the computer and should be easy to implement in existing computer codes, since almost all the ingredients are standard quantities. Results for aluminum and silicon show the high accuracy and reliability of the formalism derived.