Abstract. We study the functional calculus for operators of the form f h (P (h)) within the theory of semiclassical pseudodifferential operators, where {f h } h∈(0,1] ⊂ C ∞ c (R) denotes a family of hdependent functions satisfying some regularity conditions, and P (h) is either an appropriate selfadjoint semiclassical pseudodifferential operator in L 2 (R n ) or a Schrödinger operator in L 2 (M ), M being a closed Riemannian manifold of dimension n. The main result is an explicit semiclassical trace formula with remainder estimate that is well-suited for studying the spectrum of P (h) in spectral windows of width of order h δ , where 0 ≤ δ < 1 2 .