In this paper, the maximal abelian dimension is algorithmically and computationally studied for the Lie algebra h(n), of nxn upper -triangular matrices. More concretely, we define an algorithm to compute abelian subalgebras of h(n), besides programming its implementation with the symbolic computation package MAPLE. The algorithm returns a maximal abelian subalgebra of h(n), and, hence, its maximal abelian dimension. The order n of the matrices h(n) is the unique input needed to obtain these subalgebras. Finally, a computational study of the algorithm is presented and we explain and comment some suggestions and comments related to how it works.