You will make at least one transfer in traveling from Sendai Station (in Sendai City in Miyagi) to Goryōkaku or Hakodate Station (in Hakodate City in Hokkaido).
Will you travel back to Sendai by JR?
If so, either a Japan Rail Pass or a JR East-South Hokkaido Rail Pass will pay off, covering the whole route between Sendai and Sapporo including the side trip to Hakodate.
On 26 March 2016, Hokkaido Shinkansen will begin to connect Shin-Aomori Station (in Aomori City in Aomori) and Shin-Hakodate-Hokuto Station (in Hokuto City in Hokkaido).
In October 2016
: You can take one through Shinkansen train from Sendai to Shin-Hakodate-Hokuto on Tohoku Shinkansen (operated by JR-East) and Hokkaido Shinkansen (operated by JR-Hokkaido), which will require roughly 2 and a half hours.
: Then, you can take a Hakodate Liner train from Shin-Hakodate-Hokuto to Goryōkaku or Hakodate (on the Hakodate Line), which will require roughly 15 to 20 minutes.
: Then, you can take a Limited Express Hokuto or Super Hokuto to Sapporo (on the Hakodate, Muroran and Chitose Lines), which will require roughly 3 and a half hours.
A Japan Rail Pass, which is offered jointly by the six JR regional passenger railway companies, will cover Hokkaido Shinkansen from its first operation day (= 26 March 2016).
http://www.japanrailpass.net/en/about_jrp.htmlA JR East-South Hokkaido Rail Pass will become available from 1 April 2016, offered jointly by JR-East and JR-Hokkaido.
http://www.japan-guide.com/e/e2361_southhokkaido.htmlPlease note that the one-way JR regular tickets for the whole route will be less expensive than each of the above-mentioned two passes.