Let (resp. ) be the simplicial complex and the facet ideal (resp. ). When , we give the exact formulas to compute the depth and Stanley depth of quotient rings and for all . When , we compute the depth and Stanley depth of quotient rings and , and give lower bounds for the depth and Stanley depth of quotient rings for all .