A systematic data-based design method for tuning proportional-integral-derivative (PID) controllers for disturbance attenuation is proposed. In this method, a set of closed-loop plant data are directly exploited without using a process model. PID controller parameters for a control system that behaves as closely as possible to the reference model for disturbance rejection are derived. Two algorithms are developed to calculate the PID parameters. One algorithm determines the optimal time delay in the reference model by solving an optimization problem, whereas the other algorithm avoids the nonlinear optimization by using a simple approximation for the time delay term, enabling derivation of analytical PID tuning formulas. Because plant data integrals are used in the regression equations for calculating PID parameters, the two proposed algorithms are robust against measurement noises. Moreover, the controller tuning involves an adjustable design parameter that enables the user to achieve a trade-off between performance and robustness. Because of its closed-loop tuning capability, the proposed method can be applied online to improve (retune) existing underperforming controllers for stable, integrating, and unstable plants. Simulation examples covering a wide variety of process dynamics, including two examples related to reactor systems, are presented to demonstrate the effectiveness of the proposed tuning method. (C) 2016 ISA. Published by Elsevier Ltd. All rights reserved.