The world had come to the brink of war but this had been averted. Cuba stayed communist and highly armed though the Soviet missiles were removed under UN supervision.
Both sides considered they had secured a victory - Khrushchev had saved the communist regime in Cuba from invasion by the USA, and had negotiated a deal with the USA on the removal of their Jupiter missiles in Turkey. Kennedy had kept his election promise and stood up to the USSR, and kept nuclear missiles out of Cuba.
Both leaders emerged with something from the crisis and both sides had shown restraint. The USA did not react to the loss of a U2 plane and the USSR did not react to a U2 flight over their airspace in Siberia or the US navy forcing a Soviet submarine to surface.
Both allowed their opponent to retreat without too much loss of face. Kennedy did not boast of victory and paid tribute to Khrushchev’s contribution to peace. While Khrushchev did not reveal the secret deal over Turkey, both powers honoured the agreements made.