Stock market indices are primarily used to gauge the performance or investor sentiment in the market or a single segment or sector. Indices provide a benchmark against which investors can measure and compare the performance of individual stocks and their overall portfolios. Indices are also used to create index funds, which allow investors to invest in a basket of stocks that closely track the performance of an index.