In computational geometry, Chan's algorithm, named after Timothy M. Chan, is an optimal output-sensitive algorithm to compute the convex hull of a set P {\displaystyle P} of n {\displaystyle n} points, in 2- or 3-dimensional space. The algorithm takes O ( n log h ) {\displaystyle O(n\log h)} time, where h {\displaystyle h} is the number of vertices of the output (the convex hull). In the planar case, the algorithm combines an O ( n log n ) {\displaystyle O(n\log n)} algorithm (Graham scan, for example) with Jarvis march ( O ( n h ) {\displaystyle O(nh)} ), in order to obtain an optimal O ( n log h ) {\displaystyle O(n\log h)} time. Chan's algorithm is notable because it is much simpler than the Kirkpatrick–Seidel algorithm, and it naturally extends to 3-dimensional space. This paradigm has been independently developed by Frank Nielsen in his Ph.D. thesis.