We prove a surgery formula for the smooth Yamabe invariant σ(M ) of a compact manifold M . Assume that N is obtained from M by surgery of codimension at least 3. We prove the existence of a positive constant Λn, depending only on the dimension n of M , such that σ(N ) ≥ min{σ(M ), Λn}.