An inclusive search for supersymmetry (SUSY) using the razor variables is performed using a data sample of proton-proton collisions corresponding to an integrated luminosity of 35.9 fb(-1), collected with the CMS experiment in 2016 at a center-of-mass energy of =13 TeV. The search looks for an excess of events with large transverse energy, large jet multiplicity, and large missing transverse momentum. The razor kinematic variables are sensitive to large mass differences between the parent particle and the invisible particles of a decay chain and help to identify the presence of SUSY particles. The search covers final states with zero or one charged lepton and features event categories divided according to the presence of a high transverse momentum hadronically decaying W boson or top quark, the number of jets, the number of b-tagged jets, and the values of the razor kinematic variables, in order to separate signal from background for a broad range of SUSY signatures. The addition of the boosted W boson and top quark categories within the analysis further increases the sensitivity of the search, particularly to signal models with large mass splitting between the produced gluino or squark and the lightest SUSY particle. The analysis is interpreted using simplified models of R-parity conserving SUSY, focusing on gluino pair production and top squark pair production. Limits on the gluino mass extend to 2.0 TeV, while limits on top squark mass reach 1.14 TeV.