Question 1047238
I cannot imagine how this can be real, or how the depth of the space would not play into consideration.
Maybe you are trying to store that microwave on a shelf at the back of a narrow walk-in closet.
but here is how I interpret the question.
From above, the entry space, and the space where the object will be turned around look like this:
{{{drawing(600,300,-42,14,-14,14,
line(-36,-11.75,-36,11.75),
line(-36,-11.75,0,-11.75),
line(-36,11.75,0,11.75),
locate(-39.5,2.5,23.5),locate(-41,0.5,inches),
line(0,-11.75,0,-10),
line(0,11.75,0,10),
line(0,-10,2,-10),
line(0,10,2,10),
locate(-25,-10.25,depth>consideration),
arrow(1,0,1,-10),arrow(1,0,1,10),
locate(1.5,1,width<21.9inches)
)}}}
Now, let me add the desired location for that microwave, and the microwave entering the constricted space.
{{{drawing(600,300,-42,14,-14,14,
line(-36,-11.75,-36,11.75),
line(-36,-11.75,0,-11.75),
line(-36,11.75,0,11.75),
locate(-39.5,2.5,23.5),locate(-41,0.5,inches),
line(0,-11.75,0,-10),
line(0,11.75,0,10),
line(0,-10,2,-10),
line(0,10,2,10),
green(rectangle(-35.35,-10.95,-18,10.95)),
red(rectangle(-8.9,-8.675,13,8.675)),
locate(-2,8.5,red(21.9inches)),
locate(-8.5,1,red(17.35inches))
)}}}

Once that red rectangle enters the space that is 23.5 inches wide,
you would like to turn it around.
However, at all times the four corners of that rectangle will be on a circle with a diameter as long as the diagonal of that rectangle.
According to the Pythagorean theorem, the length of that diagonal, in inches, is
{{{sqrt(21.9^2+17.35^2)=sqrt(479.61+301.0225)=sqrt(780.6325)=about27.94}}} .
so you need a 28 inch wide space to turn that around.
 
NOTE 1:
If that microwave had a really incredibly short height, say 8.5 inches,
you could enter it on its back (back down, front up).
Then your red rectangle would be 8.5 inches by 21.9 inches,
with a diagonal measuring almost 23.5 inches.
After its length is along the width of the closet, then you could "log-roll" it to have the back against the back of the space.
 
NOTE 2:
If the floor plan is not exactly like my drawing,
your easiest solution would be to separately draw to scale on graph paper ( or grid paper)
1) your floor plan, and
2) the microwave (top view and front view).
Cutting out the microwave shapes, you can play with them on the floor plan drawing to see if you can fit it through.