It’s expensive if you reside in Japan. If you’re visiting you can get all-you-can eat rail travel (including Shinkansen, though only a limited choice) for relatively little money, e.g. one week for less than $300 and two weeks for less than $450), see https://en.wikipedia.org/wiki/Japan_Rail_Pass.