Spectrum sharing is one of the promising solutions to meet the spectrum demand in fifth‐generation networks that results from the emerging services like machine‐to‐machine and vehicle‐to‐infrastructure communication. The idea is to allow a set of entities to access the spectrum whenever and wherever it is unused by the licensed users. In the proposed framework, different spectrum provider (SP) networks with surplus spectrum available may rank the operators requiring the spectrum, called spectrum users (SUs) hereafter, differently in terms of their preference to lease spectrum, based, for example, on target business market considerations of the SUs. Similarly, SUs rank SPs depending on a number of criteria, for example, based on coverage and availability in a service area. Ideally, both SPs and SUs prefer to provide/get spectrum to/from the operator of their first choice, but this is not necessarily always possible due to conflicting preferences. We apply matching theory algorithms with the aim to resolve the conflicting preferences of the SPs and SUs and quantify the effect of the proposed matching theory approach on establishing preferred (spectrum) provider‐user network pairs. We discuss both one‐to‐one and many‐to‐one spectrum sharing scenarios and evaluate the performance using Monte Carlo simulations. The results show that comprehensive gains in terms of preferred matching of the provider‐user network pairs can be achieved by applying matching theory for spectrum sharing as compared with uncoordinated spectrum allocation of the available spectrum to the SUs.