Is there any indicator or measure which can be used to determine the degree of corellation of a stock with the broader market. I like to find stocks which are least bothered by either bull or bear run of the market.
Beta is the correct answer. It is THE measure of the risk relationship of a stock with the broad market.
R squared is incorrect unless you mean something very odd by "co-efficiency." A stock that goes up each time the market goes down has very low co-efficiency (negative risk as you have defined it) but very high R squared. A stock that goes the same direction as the market but twice as far (with a lot of noise) has a very low R squared but contains a lot of market risk. A stock that always goes in the same direction as the market but only a 100th as far is very safe but has a very high R squared.
You can calculate beta using "slope" in excel or doing a regression, but the easiest thing is just to look up the beta in yahoo finance or elsewhere. You don't need to calculate it for yourself normally.