Hi there,
The main thing to factor is how much you'll be using the Shinkansen bullet trains, as they have the most expensive travel costs and so therefore the amount you use them dictates essentially whether the JR Pass will be a cost-effective option for you.
If you plan on making several trips throughout your stay, including travel between Tokyo, Kyoto and Osaka, as well as additional trips to places such as (e.g.) Hiroshima, Kanazawa, Nagasaki or other cities also accessible via Shinkansen then I'd certainly recommend it. It would mean that all your local JR trains would also be covered, including travel to and from the airports you'll be flying in and out of.
Kind regards,
Alexis