I don't have the detail formula. I just get the answer by experiment drawing Oval and Rectangle. I measure the width of oval and width of rectangle, then I got the answer as below:

wRec = wCir / 1.41
hRec = hCir / 1.41

It is useful when we want to add the textbox area to an oval without make text show out of the oval.