We calculate the cross section for annihilation into three jets for massive quarks at next-to-leading order in perturbative QCD, both on and off the resonance. Our computation allows the implementation of any jet clustering algorithm. We give results for the three-jet cross section involving quarks for the JADE and Durham algorithm at c.m. energies . We also discuss a three-jet observable that is sensitive to the mass of the quark.