First, by the analysis of the diffraction patterns, you can determine the lattice parameters, e.g. the edge lengths (a,b,c) and the axial angles (alpha, beta, gamma) of the unit cell. Interpretation of diffraction patterns is not easy, and it's software-aided in most cases.
For every type of crystal system (cubic, hexagonal, etc.) you can then calculate the unit cell volume starting from the lattice parameters, e.g. V = a3 for cubic crystals (where a=b=c, and alpha=beta=gamma=90°), or V = a2c sin60° for hexagonal crystals (where a=b and alpha=beta=90°, but gamma=120°).
Finally, provided that you know the material density, you can calculate the mass unit cell by multiplying the unit cell volume by the density.