We address the variational problem for the generalized principal eigenvalue on R d of linear and semi-linear elliptic operators associated with nondegenerate diffusions controlled through the drift. We establish the Collatz-Wielandt formula for potentials that vanish at infinity under minimal hypotheses, and also for general potentials under blanket geometric ergodicity assumptions. We also present associated results having the flavor of a refined maximum principle.where P(D) denotes the set of Borel probability measures onD, and C 2,+ (D) the space of positive functions in C 2 (D) ∩ C(D). Taking the supremum over measures, followed by the infimum over the function space, also results in equality, and this forms an extension of the classical Collatz-Wielandt formula. For versions of this formula for nonlinear operators on a bounded domain see [6,18]. The Collatz-Wielandt formula for a reflected controlled diffusion on a bounded domain has been studied in [5] with the aid of nonlinear versions of the Krein-Rutman theorem. Establishing this min-max formula over R d is quite challenging, not only due to the lack of compactness, but also because the generalized principal eigenvalue of an operator does not enjoy all the structural properties of eigenvalues over bounded