KPC-Toolbox is a library of MATLAB functions for fitting an empirical dataset into a Markov model such as a phase-type distribution (PH) or a Markovian arrival process (MAP). The user provides the input trace describing, e.g., packet inter-arrival times, job response times, job service times. Based on the statistical descriptors of the trace, the KPC-Toolbox automatically fits the dataset into a PH or a MAP using exact and approximate moment matching techniques. PHs and MAPs can be easily integrated in queueing models for performance prediction and are compositional with Markov models in general. PHs include hyper-exponential, Erlang, hypo-exponential/generalized Erlang, acyclic phase-type distributions as special cases. Special cases of MAPs are instead the interrupted Poisson process (ON/OFF), the switched Poisson process, and the Markov Modulated Poisson process (MMPP). The KPC-Toolbox is distributed to the public for research and testing. If you have any questions, ideas or suggestions, please contact the maintainer: g DOT casale AT imperial DOT ac DOT uk.