Doing a near Max Takeoff Weight from Dubai to Auckland 16 hr flight taking off from 12R with an OAT of +39 the Takeoff Calculator when set to optimum gives me flaps 2, flex takeoff with packs on. If I use the calculated numbers I will go off the end of the runway before VR. I attempted the same takeoff three times using the exact numbers it provided all three times failed takeoffs. It wasn’t until I removed the flex temp for full TOGA, set Flaps 3 with Packs Off was I able to get off the runway in time. I think the T/O calculator needs to be looked at.