Density is defined as mass per unit volume. The density of the majority of the material is available in the literature. Actually I would like to find the density of TiC0.7N0.3 please let me know.
In a broad sense, since compound is stoichiometric, after running a DRX (parameters should be set up to research), a crystallographic analysis should be carried out. Some software based on the Rietveld refinement of structures can be used. In fact, from structural refinement, the lattice parameters compose major parameters since from these the Volume of unitary cell (Volume) will be derived. From atomic positions, mass of atoms or its fraction inner the unitary cell gives the parameter Mass. In the sequence, Mass/Volume gives the density of compound or compounds.