The formula for calculating stresses in a spherical pressure vessel with higher inside pressure than outside is σ = pd/4t, applicable for both circumferential and hoop components. However, when designing a pressure vessel, compliance with national pressure vessel codes, such as the ASME Boiler and Pressure Vessel codes in the US, is essential. The ASME BPV provides a specific equation for shell thickness: t = PR / (2SE - 0.2P), where variables represent pressure, radius, maximum allowable stress, and joint efficiency. Additionally, a theoretical analysis of the stress-energy tensor indicates that the integral of the trace for the entire pressure vessel sums to zero, confirming the balance between internal pressure and tension in the material. Understanding these calculations is crucial for ensuring safety and compliance in pressure vessel design.