The structural, elastic and electronic properties of two-dimensional (2D) titanium carbide/nitride based pristine (Tin+1Cn/Tin+1Nn) and functionalized MXenes (Tin+1CnT2/Tin+1NnT2, T stands for the terminal groups: -F, -O and -OH, n = 1, 2, 3) are investigated by density functional theory calculations. Carbide-based MXenes possess larger lattice constants and monolayer thicknesses than nitride-based MXenes. The in-plane Young's moduli of Tin+1Nn are larger than those of Tin+1Cn, whereas in both systems they decrease with the increase of the monolayer thickness. Cohesive energy calculations indicate that MXenes with a larger monolayer thickness have a better structural stability. Adsorption energy calculations imply that Tin+1Nn have stronger preference to adhere to the terminal groups, which suggests more active surfaces for nitride-based MXenes. More importantly, nearly free electron states are observed to exist outside the surfaces of -OH functionalized carbide/nitride based MXenes, especially in Tin+1Nn(OH)2, which provide almost perfect transmission channels without nuclear scattering for electron transport. The overall electrical conductivity of nitride-based MXenes is determined to be higher than that of carbide-based MXenes. The exceptional properties of titanium nitride-based MXenes, including strong surface adsorption, high elastic constant and Young's modulus, and good metallic conductivity, make them promising materials for catalysis and energy storage applications.