To keep things relatively simple I will assume the circular rim of the cup has a radius of 1.
It’s not important to solving the question, but for the two orientations to be possible, the edge length of the cube must be somewhere between sqrt(6)/2 (1.225..) and 2. Any smaller than that and the point-down cube would fall in, any larger and the edge-down cube would not fit within the rim.
So on the assumption that we are within that range and both configurations are possible, it turns out that for the point-down orientation, the cube side length doesn’t matter: in theory you could have a mile long cube and the portion below the rim would be exactly the same.
To work out what that depth is for our unit radius cup, consider a cross-section through the cube and cup through point A O and D:
Since the entire face that triangle BCO is part of is perpendicular to edge AO, so is line OD. Projecting down to the side view we can use the fact that an angle in a semicircle is a right angle to ascertain that the depth is sqrt(2)/2 or 0.707…
So now we need to find the cube size for which the edge-down cube will also be at that same depth. By looking side-on at the diamond-shaped end of the cube with the required depth, and then looking at the plan view, we can see that the edge length of the cube must be sqrt(2) = 1.414…. Inevitably, this lies in our range of acceptable cube sizes.
So finally, how can you tell simply and visually if the edge length of the cube (as a ratio of the radius of the cup) exceeds sqrt(2)? Do you remember the forgotten third orientation – face-down? Simply if the face-down cube lies within the rim of the cup, then the ratio of edge length to radius is less than sqrt(2) and the edge-down orientation will be deeper than point-down, whereas if the face-down cube can sit on top of the cup with all four corners outside of the rim, then the point-down orientation will be deeper.