Methods, systems, and computer-readable medium to perform operations including: determining, in real-time, values of drilling parameters of a drilling system drilling a wellbore; calculating, based on the values of the drilling parameters, a cuttings concentration in an annulus of the wellbore (CCA); calculating, based on the calculated CCA and a mud weight (MW) of a drilling fluid, an effective mud weight (MWeff) of the drilling fluid; using the effective mud weight to calculate an equivalent circulating density (ECD) of the drilling fluid; and controlling, based on the equivalent circulating density, a component of the drilling system to adjust at least one of the drilling parameters.