An extended application of a finite-element approach with localized functional to a three-dimensional magnetic field problem is described in this paper. The field region is modeled by a set of partial differential equations in terms of scalar potentials. The variational approach is used to obtain the system matrix. The localized functional is derived, which consists of the domain integral of the finite element region only and the boundary integral of the interfacial boundary between the finite and infinite element regions. The proposed approach is applied to a sample problem. The result has been compared with the standard finite element method and an analytic solution. The numerical solutions obtained by the proposed approach are in good agreement with the analytic solutions and show better accuracy than those of the standard finite element method.