Protein aggregation is associated with an increasing number of human disorders and premature aging. Moreover, it is a central concern in the manufacturing of recombinant proteins for biotechnological and therapeutic applications. Nevertheless, the unique architecture of protein aggregates is also exploited by nature for functional purposes, from bacteria to humans. The relevance of this process in health and disease has boosted the interest in understanding and controlling aggregation, with the concomitant development of a myriad of algorithms aimed to predict aggregation propensities. However, most of these programs are blind to the protein environment and, in particular, to the influence of the pH. Here, we developed an empirical equation to model the pH-dependent aggregation of intrinsically disordered proteins (IDPs) based on the assumption that both the global protein charge and lipophilicity depend on the solution pH. Upon its parametrization with a model IDP, this simple phenomenological approach showed unprecedented accuracy in predicting the dependence of the aggregation of both pathogenic and functional amyloidogenic IDPs on the pH. The algorithm might be useful for diverse applications, from large-scale analysis of IDPs aggregation properties to the design of novel reversible nanofibrillar materials.