tdc.msm: An R library for the analysis of multi-state survival data. The aim of this paper is to present an R library, called tdc.msm, developed to analyze multi-state survival data. In this library, the time-dependent regression model and multi-state models are included as two possible approaches for such data. For the multi-state modelling five different models are considered, allowing the user to choose between Markov and semi-Markov property, as well as to use homogeneous or non-homogeneous models. Specifically, the following multi-state models in continuous time were implemented: Cox Markov model; Cox semi-Markov model; homogeneous Markov model; non-homogeneous piecewise model and non-parametric Markov model. This software can be used to fit multi-state models with one initial state (e.g., illness diagnosis), a finite number of intermediate states, representing, for example, a change of treatment, and one absorbing state corresponding to a terminal event of interest. Graphical output includes survival estimates, transition probabilities estimates and smooth log hazard for continuous covariates.