Well let the length of one side = x.
length of diagonal = from Pythagoras' theorem.
Let them equal each other.
Well it's a cube isn't it? It's a three dimensional object. will give you the hypotenuse of two dimensions, but that is the diagonal along one face of the cube, from your question, I assumed you wanted the diagonal between opposing points of the cube, ie. front bottom left, to top right back.
in which case you will use the first hypotenuse and use Pythagoras' theorem with another edge piece to find the next hypotenuse (the answer you're searching for)