Density is defined as the mass per unit volume. So its formula is
Density = Mass/Volume
Dimensional Formula of Mass = M1L0T0
Dimensional Formula of Volume = M0L3T0
Putting these values in above equation we get,
Dimensional Formula of Density =M1L-3T0
SI unit of Density is kg/ m3