In a recent paper, Rosen and Silverman showed that Tate's conjecture on algebraic cycles implies a formula of Nagao, which gives the rank of an elliptic surface in terms of a weighted average of fibral Frobenius trace values. In this article, we extend their result to the case of elliptic threefolds. The main ingredients of our argument are a Shioda–Tate-like formula for elliptic threefolds, and a relation between the ‘average’ number of rational points on singular fibers and the Galois action on those fibers.