Crude and quasi Monte Carlo (MC) sampling techniques are common tools dedicated to estimating statistics (expectation, variance, covariance) of a random quantity of interest. We focus here on the uncertainty quantification framework where the quantity of interest is the output of a numerical simulator fed with uncertain input parameters. Then, sampling the output involves running the simulator for different samples of the inputs, which may be computationally time-consuming. To reduce the cost of sampling, a first approach consists in replacing the numerical simulator by a surrogate model that is cheaper to evaluate, thus making it possible to generate more samples of the output and therefore leading to a lower sampling error. However, this approach adds to the sampling error an unavoidable model error. Another approach, which does not introduce any model error, is the so-called multilevel MC (MLMC) method. Given a sequence of levels corresponding to numerical simulators with increasing accuracy and computational cost, MLMC combines samples obtained at different levels to construct an estimator at a reduced cost compared to standard MC sampling. In this paper, we derive and analyze multilevel covariance estimators and adapt the MLMC convergence theorem in terms of the corresponding covariances and fourth order moments. We propose a multilevel algorithm driven by a target cost as an alternative to typical algorithms driven by a target accuracy. These results are used in a sensitivity analysis context in order to derive a multilevel estimation of Sobol' indices, whose building blocks can be written as covariance terms in a pick-and-freeze formulation. These contributions are successfully tested on an initial value problem with random parameters.