The optical, elastic anisotropic and thermodynamic properties of TiN in the NaCl (B1) structure are analyzed in detail in the temperature range from 0 to 2000 K and the pressure range from 0 to 20 GPa. From the calculated dielectric constants, a first order isostructural phase transition between 29 and 30 GPa is found for TiN. The absorption spectra exhibit high values ranging from the far infrared region to the ultra-violet one. The anisotropy value of Young's modulus of TiN is smaller than that of c-BN at 0 GPa and the anisotropy of TiN clearly increases with an increase of pressure. The effects of pressure and temperature on the bulk modulus, Grüneisen parameter, Gibbs free energy, and Debye temperature are significant. The Grüneisen parameter of TiN is much larger than that of c-BN. At temperatures below 1000 K, TiN's heat capacity is much larger than that of c-BN.