A new data structure for accurate online accumulation of rank-based statistics such as quantiles and trimmed means. The t-digest algorithm is also very friendly to parallel programs making it useful in map-reduce and parallel streaming applications implemented using, say, Apache Spark. The t-digest construction algorithm uses a variant of 1-dimensional k-means clustering to produce a very compact