A quantum calculation of the third virial coefficient of a two-dimensional gas obeying fractional statistics is performed by diagonalizing the three-body Hamiltonian in a harmonic-oscillator potential with a large fermionic basis. The numerical results for the virial coefficient A3 as a function of the flux strength alpha (alpha = 0 for fermions, alpha = 1 for bosons) are reliable in the range 0 less-than-or-equal-to alpha less-than-or-equal-to 0.25. A3 increases quadratically with alpha for very small alpha, but higher powers contribute substantially for large alpha.