Uncertainty quantification is very important in many applications. As a generalization of Dempster‐Shafer theory, the theory of D numbers is a new theoretical framework for uncertainty reasoning. Measuring the uncertainty of knowledge or information represented by D numbers is an unsolved issue in that theory. In this paper, inspired by distance‐based uncertainty measures for Dempster‐Shafer theory, a total uncertainty measure for a D number is proposed based on its belief intervals. The proposed total uncertainty measure can simultaneously capture the discord, and nonspecificity, and nonexclusiveness involved in D numbers. And some basic properties of this total uncertainty measure, including range, monotonicity, generalized set consistency, are also presented. At last, an illustrative application about feature evaluation is given to verify the effectiveness of the proposed uncertainty measure.