P-glycoprotein (P-gp) is a member of ABC transporter family that actively pumps xenobiotics out of cells to protect organisms from toxic compounds. P-gp substrates can be easily pumped out of the cells to reduce their absorption, conversely P-gp inhibitors can reduce such pumping activity. Hence, it is crucial to know if a drug is a P-gp substrate or inhibitor in view of pharmacokinetics. Here we present PgpRules, an online P-gp substrate and P-gp inhibitor prediction server with ruled-sets. The two models were built using classification and regression tree (CART) algorithm. For each compound uploaded, PgpRules not only predicts whether the compound is a P-gp substrate or a P-gp inhibitor, but also provides the rules containing chemical structural features for further structural optimization.