Nifty represents 50 stocks listed on the NSE, while Sensex comprises 30 stocks listed on the BSE. Both indices are used to gauge the performance of the Indian stock market but have different compositions and calculation methods.