A three dimensional magnetic vector potential (m.v.p.) formulation of magnetostatic fields with non-uniform permanent magnet source distribution is given. A right-hand term expression describing the nonuniform permanent magnet source for a first order tetrahedral finite element is derived. The three dimensional finite element m.v.p. formulation presented is rather straightforward and easy to implement. Moreover, it is applicable both to uniformly and non-uniformly magnetized permanent magnet fields and hence has high generality. The field solution for a rectangular parallelepiped magnet stabilised in air is computed by the presented method, and is found to be in good agreement with measured results.