  Moduli of rings and quadrilaterals are frequently applied in geometric
function theory, see e.g. the Handbook by K\"uhnau. Yet their exact values are
known only in a few special cases. Previously, the class of planar domains with
polygonal boundary has been studied by many authors from the point of view of
numerical computation. We present here a new $hp$-FEM algorithm for the
computation of moduli of rings and quadrilaterals and compare its accuracy and
performance with previously known methods such as the Schwarz-Christoffel
Toolbox of Driscoll and Trefethen. We also demonstrate that the $hp$-FEM
algorithm applies to the case of non-polygonal boundary and report results with
concrete error bounds.
