We compute the class of the classifying stack of the exceptional algebraic group G 2 and of the spin groups Spin 7 and Spin 8 in the Grothendieck ring of stacks, and show that they are equal to the inverse of the class of the corresponding group. Furthermore, we show that the computation of the motivic classes of the stacks BSpin n can be reduced to the computation of the classes of B∆n, where ∆n ⊂ Pinn is the "extraspecial 2-group", the preimage of the diagonal matrices under the projection Pinn → On to the orthogonal group.