Compressive
stresses are generated in objects when they are subjected to forces that push inward, causing the material to shorten or compress. These stresses occur when an object is squeezed or pressed from opposite directions. In everyday life, compressive stresses are common in many structures and materials. For instance, the weight of a building creates compressive stresses in its walls and foundations. Similarly, when a person stands, the bones in their legs experience compressive stresses due to the weight of the body pushing down. Compressive stresses can lead to deformation if they are strong enough, potentially causing the object to change shape or, in extreme cases, to break. The ability of a material to withstand compressive stresses without failing is known as its
compressive strength.
When an object is subjected to a force in a single direction (referred to as a uniaxial
compression), the compressive stress is determined by dividing the applied force by the cross-sectional area of the object.
Consequently, compressive stress is expressed in units of force per unit area.

Thus, the formula for compressive stress is,
Where:
σ is the compressive stress,
F is the force applied on the object, and
A is its cross-sectional area.
As shown in the formula above, compressive stress is typically represented by
negative values to indicate that there is compression of an object, however, in
geotechnical engineering compressive stress is conventionally represented by
positive values.
Failure of a loaded object occurs when the compressive stress reaches or exceeds its
compressive strength. However, in long slender elements, such as columns or
truss
A truss is an assembly of ''members'' such as Beam (structure), beams, connected by ''nodes'', that creates a rigid structure.
In engineering, a truss is a structure that "consists of two-force members only, where the members are organized so ...
bars, it can occur at a lower stress because of
buckling.
References
Materials science
{{materials-sci-stub