TIMATIC offers authoritative answers to this question. Since OP did not mention nationality, it's not possible to answer OP authoritatively. With a made-up itinerary and nationality, TIMATIC states the following regarding transit in Japan:
Transiting without a visa is possible for:
...
Holders of onward tickets transiting to a third country can obtain a Shore Pass on arrival for a max. stay of 72 hours only if there are no connecting flights on the same calendar day and if
...
From this, I believe OP's itinerary probably does not qualify for a Shore Pass as OP's itinerary does not involve an overnight at NRT.