We describe an algorithm for computing the -canonical basis of the Hecke algebra,or one of its antispherical modules. The algorithm does not operate in the Hecke category directly, but rather uses a faithful embedding of the Hecke category inside a semisimple category to build a "model" for indecomposable objects and bases of their morphism spaces. Inside this semisimple category, objects are sequences of Coxeter group elements, and morphisms are (sparse) matrices over a fraction field, making it quite amenable to computations. This strategy works for the full Hecke category over any base field, but in the antispherical case we must instead work over Z ( ) and use an idempotent lifting argument to deduce the result for a field of characteristic > 0.We also describe a less sophisticated algorithm which is much more suited to the case of finite groups. We provide complete implementations of both algorithms in the MAGMA computer algebra system.by Jensen to generate data leading to his revised form of the billiards conjecture [Jen21]. The simpler algorithm presented at the end of this paper was used to generate the tables in the appendix of [EJG21].The algorithm is programmed using the computer algebra package MAGMA [BCP97]. The source code for the main algorithm (as well as a simpler algorithm appropriate for finite groups) is available online at https://github.com/joelgibson/ASLoc.Organisation of the paper is as follows. In Section 2 we fix notation and briefly recall the definitions of Hecke algebra, realisation, root system, Hecke category, and antispherical category. In Section 3 we review localisation for the Hecke and antispherical categories, our key tool for computations. Finally, the main algorithm is stated in Section 4, and a simpler algorithm which works particularly well for finite groups of small rank is stated in Section 5.