In the present paper we shall investigate the Waring's problem for upper triangular matrix algebras. The main result is the following: Let n ≥ 2 and m ≥ 1 be integers. Let p(x 1 , . . . , xm) be a noncommutative polynomial with zero constant term over an infinite field K. Let Tn(K) be the set of all n × n upper triangular matrices over K. Suppose 1 < r < n − 1, where r is the order of p. We have that p(Tn(K)) + p(Tn(K)) = J r , where J is the Jacobson radical of Tn(K). If r = n − 2, then p(Tn(K)) = J n−2 . This gives a definitive solution of a conjecture proposed by Panja and Prasad.