In Maulik and Thomas (in preparation) the Vafa-Witten theory of complex projective surfaces is lifted to oriented C *-equivariant cohomology theories. Here we study the K-theoretic refinement. It gives rational functions in t 1/2 invariant under t 1/2 ↔ t −1/2 which specialise to numerical Vafa-Witten invariants at t = 1. On the "instanton branch" the invariants give the virtual χ −t-genus refinement of Göttsche-Kool, extended to allow for strictly semistable sheaves. Applying modularity to their calculations gives predictions for the contribution of the "monopole branch". We calculate some cases and find perfect agreement. We also do calculations on K3 surfaces, finding Jacobi forms refining the usual modular forms, proving a conjecture of Göttsche-Kool. We determine the K-theoretic virtual classes of degeneracy loci using Eagon-Northcott complexes, and show they calculate refined Vafa-Witten invariants. Using this Laarakker (Monopole contributions to refined Vafa-Witten invariants. arXiv:1810.00385) proves universality results for the invariants. Contents L ⊗ O C ] = [Lι * O C ] ∈ K 0 (M). The result is slightly different-differing by a Todd class, by virtual Riemann-Rochand therefore interesting! (Especially when we work equivariantly with respect to the T action.) To get the Nekrasov-Okounkov-twisted version of this used in our paper we instead take the intersection in KO-theory. This replaces the K-theoretic "fundamental classes" O Z of submanifolds by their twists by K 1/2 Z (this is the Atiyah-Bott-Shapiro complex orientation, and is well defined over Z only for spin manifolds). The universal case is complex cobordism theory; see [Sh,GK2] for instance. From this one can pass to all other oriented cohomology theories, such as "topological modular forms". 2 In Vafa-Witten theory, the three T-equivariant cohomology theories homology, KO-theory, tmf give rise to virtual versions of M 1, A(M), Witten genus (M) of the Vafa-Witten moduli space M respectively. On the "instanton locus" these produce the Euler characteristic, Hirzebruch χ y-genus, elliptic genus of the moduli space of instantons (or Gieseker stable sheaves) on the surface S. (This apparent paradox is because the Vafa-Witten obstruction theory on the instanton moduli space differs from its usual obstruction theory.) Calculations give generating series which seem to be (modular forms, Jacobi forms, Borcherds lifts of Jacobi forms) respectively; in particular see [GK2] for the instanton locus contributions in rank 2.