Any magnetically confined plasma possesses a certain amount of available energy, defined as that part of the thermal energy that can be converted into instabilities and turbulence. Here, we present a calculation of the available energy carried by magnetically trapped electrons in a slender flux tube of collisionless plasma. This quantity is compared with nonlinear gyrokinetic simulations of the turbulent energy flux resulting from collisionless turbulence driven by a density gradient in various tokamak and stellarator devices. The numerical calculation of available energy is extremely fast and shows a strong correlation with energy fluxes found in the gyrokinetic simulations, which can be expressed as a simple power law and understood in terms of a phenomenological model.