In physics, buoyancy is an upward acting force, caused by fluid pressure, that opposes an object's weight. If the object is either less dense than the liquid or is shaped appropriately (as in a boat), the force can keep the object afloat. This can occur only in a reference frame which either has a gravitational field or is accelerating due to a force other than gravity defining a "downward" direction (that is, a non-inertial reference frame). In a situation of fluid statics, the net upward buoyancy force is equal to the magnitude of the weight of fluid displaced by the body. This is the force that enables the object to float.