We propose a Mathematica package which allows us to determine all the classes of three-dimensional subalgebras (TDS) of a simple Lie algebra. The programming of the package is based on the theory of semisimple subalgebras of simple Lie algebras. We summarize the main points of this theory, which leads to an algorithm for the construction of the classes of TDS. A particular emphasis is laid on the construction of the exceptional TDS of Dn. The package Decompositions.m implements this algorithm to give all the TDS of the classical simple Lie algebras, principal and nonprincipal. The package provides several functions which characterize the three-dimensional embeddings such as, for example, the set of spins of a decomposition, the defining vector, the pi-system of roots, the generators of the TDS and the generators of each decomposition.