Recent use of order patterns in time-series analysis shows the need for a corresponding theory. We determine probabilities of order patterns in Gaussian and autoregressive moving-average (ARMA) processes. Two order functions are introduced which characterize a time series in a way similar to autocorrelation. For stationary ergodic processes, all finite-dimensional distributions are obtained from the one-dimensional distribution plus the order structure of a typical time series. Copyright 2007 The Authors Journal compilation 2007 Blackwell Publishing Ltd.