Question 1058020
If I understand this right, you have a right triangle
and the legs forming the right angle are {{{ 18 }}} in
-------------------
If {{{ c }}} is the 3rd side, the front of the cabinet, then
the formula is:
{{{ c^2 = 18^2 + 18^2 }}}
{{{ c^2 = 2*( 18^2 ) }}}
{{{ c^2 = 2*324 }}}
{{{ c^2 = 648 }}}
{{{ c = 25.4558 }}}
Now take half of this 
( where the height of the triangle hits side c )
{{{ 25.4558/2 = 12.7279 }}}
---------------------------
The height would be:
{{{ h^2 = 18^2 - 12.7279^2 }}}
{{{ h^2 = 324 - 161.9994 }}}
{{{ h^2 = 162 }}}
{{{ h = 12.728 }}}
The depth of the cabinet is 12.728 in
----------------------------------
You can verify by laying out the measurements
on paper or any flat surface, then taking 
measurement of the depth
Hope this helps