## Introduction

Two-dimensional (2D) metal carbides and nitrides, commonly known as MXenes, are formed by the chemical exfoliation of parent MAX phases1. In the first report, Al was removed from Ti3AlC2 to form the Ti3C2Tz MXene2. The general chemical formula of an MXene is Mn+1XnTz, where M is a transition metal, X is carbon and/or nitrogen, and Tz stands for termination groups which can vary in composition, but typically is a combination of oxygen and fluorine atoms as well as hydroxyl groups. In the ideal case, z is equal to 2. Considering the many possible combinations of M, X, and T, a plethora of MXenes with different properties can be envisioned. However, MXenes are formed top-down from MAX phases, and, as it turns out, only particular MAX phases are suitable for chemical etching.

The most common approach to synthesize MXenes is etching in HF, which has been used for the chemical exfoliation of a range of MAX phases2,3,4,5,6,7,8,9,10, as well as for Mo2Ga2C (which is not formally a MAX phase)11. Other successful synthesis protocols include, among others, etching in HCl/LiF, HF/HCl, and HF/H2O2 mixtures6,12,13, and different types of molten salts14,15,16,17. Furthermore, the approach of chemical exfoliation is not limited to the manufacturing of MXenes, but can also be used to synthesize other 2D materials, such as the recent exfoliation of a metal boride to form 2D boridene18. The many available layered materials bring us to the question of what other 3D materials can be chemically exfoliated into 2D constituents. Large-scale computational studies have the potential of speeding up this process by screening for promising candidates. However, without an understanding of the factors making a synthesis protocol successful or not, it is difficult to know what descriptors to use as criteria. Understanding the chemical exfoliation of MXenes would be an important step in the right direction.

There have been attempts to understand what governs the possibilities of chemically exfoliating MAX phases into MXenes using theoretical modeling. Khazaei et al. studied the exfoliation for a range of MAX phases, demonstrating how the M-A bonds are weaker than the M-X bonds, suggesting a qualitative explanation of why the A element is more easily removed. The study also calculated exfoliation energy, though not considering that the A element is removed into the solution, but rather used the respective elemental bulk phase as a reference for the different A elements. Following a similar approach, Khaledialidusti et al. performed a large-scale study by screening different MAX phases and calculating exfoliation energies19. Again, the A elements were treated in their respective elemental bulk phase. Importantly, in both these cases, even for the MAX phases, which have been chemically exfoliated to form MXenes, the formation energies from MAX to MXene are positive. In other words, from these studies, it is not possible to conclude what drives the formation of a MXene from a thermodynamic point of view.

Ashton et al. studied the electrochemical synthesis of MXenes as a function of pH and electrode potential20, showing that the MXenes are thermodynamically stable compared to their MAX phases and competing dissolved species over certain pH values and potentials by the construction of Pourbaix diagrams. The latter has also been used to predict optimal synthesis conditions for MXenes with out-of-plane ordering (o-MXenes)21. However, their results indicated that high pH values are, in general, more favorable for MXene synthesis, not compatible with conventional experimental synthesis conditions. Furthermore, experiments show that MXenes chemically degrade after sufficient time in water22. Therefore, one can question if the thermodynamic stability of the MXene against solvation is an appropriate descriptor for predicting if a MXene can be synthesized or not. Moreover, conventional etching to produce MXenes is not done electrochemically. Therefore, we need to comply with the concept of electroneutrality when studying the chemical exfoliation of MAX phases into MXenes, which has, to the best of our knowledge, been overlooked by the field so far.

Here, we study the chemical exfoliation of the 23 MAX phases in hydrofluoric acid (HF) by combining calculated formation energies of MAX phases and MXenes using density functional theory with tabulated experimental formation energies of solvated molecules and ions. Chemical potentials of dissolved chemical species are derived under the constraint of electroneutrality, and explicitly express the chemical potentials for both hydrogen and fluorine as a function of pH. The calculations are compared to the known etching behavior of the MAX phases in literature, as well as previously unpublished experimental data. Our results show that the exfoliation free energy of the complete MAX to MXene transformation does not discriminate between exfoliable and non-exfoliable MAX phases, since the exfoliation is thermodynamically favorable for all considered MAX phases. Instead, we considered the competing reactions during the initial step of the etching. Under the constraint that oxygen-containing species are not formed in the acidic HF environment, it was found that MAX phases, for which the free energy difference of removing an A element is negative while it is positive for removing an M element, is chemical exfoliate in HF, with only two exceptions: Mo2ScAlC2 and Mo2GaC. The former has been successfully exfoliated, but the calculations indicate the possibility of etching Sc in addition to the Al atoms. However, for this MAX phase, the Sc atoms are partly etched, consistent with the calculations. The latter is a particular case as the synthesis of the Mo2C MXene can be formed from Mo2Ga2C but not from Mo2GaC. We can understand the different etching behaviors by considering the stepwise etching of a complete Ga layer. Finally, we take a step back, discussing the exfoliability of MAX phases in general, by simple considerations of A and M elements’ solubility in their reference state phases. Our results illuminate the complexity of predicting chemical exfoliability and, at the same time, show a route for enhancing the probability for computational studies of making predictions about novel 2D materials.

## Results

### Experimental data of unsuccessful etching attempts

Our study is primarily based on calculations, though to facilitate an improved comparison between theoretical and experimental work, we also present previously unpublished experimental data of MAX phases which we have not been able to transform into MXenes. The latter work has been performed in our laboratory over the last years, and have, to the best of our knowledge, not been reported by others. The most relevant phases are Mo2GaC, Mn2GaC, and Zr2AlC. The experiments were done by etching powders of Mo2GaC23 and Zr2AlC24 and sputter-deposited thin films of Mn2GaC25. Chemical etching was performed by immersion in HF solution with a concentration ranging from 1 to 50 vol.%, an etching time ranging from 1 min to 4 days, and a temperature ranging from room temperature to 55 °C. For all the mentioned MAX phases, no conversion to MXene was observed. As a general note, when exposed to HF, it was found that Mo2GaC stays intact for an extended period, while both Mn2GaC and Zr2AlC completely dissolve without forming their respective MXenes. See the Supplementary Information for representative X-ray diffraction data.

### Calculating exfoliation energies

The study is based on periodic density functional theory (DFT) calculations of total energies in combination with tabulated values of formation free energies for molecules and ions in solution. The details of the different settings used for the DFT calculations are provided in the Methods section. In the following, we will explain how calculated and experimental formation energies were combined in our analysis to simulate the chemical conditions associated with hydrogen fluoride aqueous solutions.

The general equation for the chemical exfoliation of a MAX phase to an MXene is

$${{{\mathrm{M}}}}_{n + 1}{{{\mathrm{AX}}}}_n + z{{{\mathrm{T}}}} \to {{{\mathrm{M}}}}_{n + 1}{{{\mathrm{X}}}}_n{{{\mathrm{T}}}}_z + {{{\mathrm{A}}}}.$$
(1)

In other words, the A element is selectively etched from Mn+1AXn to form the Mn+1XnTz MXene, where T is a termination group. In the ideal case z = 2, in which the MXene is fully terminated, we will also consider the scenario with no terminating species for which z = 0. Using the chemical equation in Eq. (1), we define the exfoliation free energy as

$$\Delta {G_{{\mathrm{exf}}.}} = \left[{{\Delta_{{\mathrm{f}}}}G\left( {{\mathrm{M}}_{n + 1}}{{\mathrm{X}}_n}{{\mathrm{T}}_{z}} \right) + \mu \left({\mathrm{A}} \right) - {\Delta_{\mathrm{f}}}G\left({{\mathrm{M}}_{n+1}}{{\mathrm{AX}}_{n}} \right) - {z \mu} \left({\mathrm{T}} \right)} \right]/\left({2n +2} \right),$$
(2)

where ΔfG(Mn+1AXn) and ΔfG(Mn+1XnTx) are the formation free energies of the MAX and MXene, respectively, μ(A) the chemical potential of the A element, and μ(T) the chemical potential of the termination species. The exfoliation free energy is normalized per atom in the parent MAX phase by the factor 1/(2n + 2). In a similar way, we can also define the free energy of solvation – the formation energy to completely dissolve the parent MAX phase in the solution – as

$$\Delta G_{{{{\mathrm{solv}}}}.} = \left[ {\left( {n + 1} \right)\mu \left( {{{\mathrm{M}}}} \right) + \mu \left( {{{\mathrm{A}}}} \right) + n\mu \left( {{{\mathrm{X}}}} \right) - \Delta _{{{\mathrm{f}}}}G\left( {{{{\mathrm{M}}}}_{n + 1}{{{\mathrm{AX}}}}_n} \right)} \right]/\left( {2n + 2} \right)$$
(3)

where μ(M) and μ(X) are the chemical potentials of the M and X elements, respectively. Furthermore, we will consider the free energy of vacancy formation, i.e., the free energy difference to remove one A element or one M element from a MAX phase, defined as

$$\Delta G_{{{{\mathrm{A}}}}/{{{\mathrm{M}}}}} = \Delta _{{{\mathrm{f}}}}G\left( {{{{\mathrm{M}}}}_{n + 1}{{{\mathrm{AX}}}}_n + {{{\mathrm{defect}}}}} \right) + \mu \left( {{{{\mathrm{A}}}}/{{{\mathrm{M}}}}} \right) - \Delta _{{{\mathrm{f}}}}G\left( {{{{\mathrm{M}}}}_{n + 1}{{{\mathrm{AX}}}}_n} \right)$$
(4)

where ΔfG(Mn+1AXn+defect) is the formation free energy of a MAX phase with either an A or M defect. In these calculations, the MAX phase was represented in a supercell consisting of two A layers (two primitive unit cells) out-of-plane and 4 × 4 primitive unit cells in-plane.

For the calculation of the chemical potentials, we need to consider that the reaction takes place in aqueous HF. The reactants in the solution are consequently H+, H2O, and different forms of fluorine ions and molecules ($${{{\mathrm{F}}}}^ -$$, $$HF_2^ -$$ and HF being the most relevant). For water, we use the tabulated formation free energy of 2.458 eV/molecule, while for ions and molecules in solution (with the exception of H+ and the chemical potential of F), the formation free energy was calculated as

$$\Delta _{{{\mathrm{f}}}}G\left( {T,C} \right) = \Delta _{{{\mathrm{f}}}}G^0\left( T \right) + k_{{{\mathrm{B}}}}T\log C.$$
(5)

Here, ΔfG0(T) is the formation free energy at standard conditions (T = 298.15 K and C = 1 L−1), T the temperature, kB Boltzmann’s constant, and C the molar concentration. The formation energies of dissolved ions and molecules were obtained from the NBS tables and Pourbaix’s 1966 Atlas (for species not available in the NBS tables)26,27. The formation free energy of H+ and the chemical potential of F can be defined as a function of pH, as outlined in the Supplementary Information.

For the chemical potential of the different chemical elements, we consider all ions and molecules involving the element together with different combinations of F, O, and H, under the condition of electroneutrality, since we are modeling conventional etching and not an electrochemical cell. In this consideration, we also include the elemental reference phase for each element for practical reasons, to provide a chemical potential also for elements without solvated species. This is necessary when constraining which types of ions and molecules are taken into consideration (vide infra). For each compound containing the element, including the elemental reference phase, the chemical potential is calculated, and we use the one with the lowest energy. This procedure is exemplified for Al in the Supplementary Information, where we also list the chemical potentials used for the different elements. As an example, the chemical potential for Al at pH = 0 can be expressed as

$$\mu _{{{{\mathrm{Al}}}}} = \Delta _{{{\mathrm{f}}}}G\left( {{{{\mathrm{AlF}}}}_3({{{\mathrm{aq}}}})} \right) + \frac{1}{2}\Delta _{{{\mathrm{f}}}}G\left( {{{{\mathrm{H}}}}_2({{{\mathrm{g}}}})} \right) - 3\Delta _{{{\mathrm{f}}}}G\left( {{{{\mathrm{HF}}}}\left( {{{{\mathrm{aq}}}}} \right)} \right),$$

where ΔfG(AlF3(aq)) is the formation free energy of aqueous AlF3(aq), ΔfG(H2(g)) is the formation free energy of hydrogen gas (which is zero) and ΔfG(HF(aq)) is the formation free energy of aqueous HF. Note that the concentration of HF, and thereby its formation free energy, depends on the pH due to equilibrium with $${{{\mathrm{F}}}}^ -$$ and $$HF_2^ -$$. For practical reasons, we define a chemical potential for the fluorine as a function of pH, as described in the Supplementary Information.

The formation free energies of solids were calculated as the difference between the electronic enthalpy of the MAX/MXene and the electronic enthalpy of its elemental constituents. For the gas phase elements hydrogen, oxygen, nitrogen, and fluorine, tabulated values for the entropy contribution at standard conditions28 were included in the respective elemental reference free energy.

### Complete exfoliation of MAX phases

First, we consider the exfoliation free energies of forming MXenes from their respective MAX phases. Figure 1a compares the exfoliation free energies for the chemical exfoliation of different MAX phases, both considering with ($$\Delta G_{{{{\mathrm{exf}}}}.}^{{{{\mathrm{with}}}}\;{{{\mathrm{T}}}}}$$) and without ($$\Delta G_{{{{\mathrm{exf}}}}.}^{{{{\mathrm{no}}}}\;{{{\mathrm{T}}}}}$$) terminations of the resulting MXene. For the results with terminations, we show either the exfoliation energy with O terminations or F terminations depending on which has the lowest value, which in most cases is oxygen (see Supplementary Table 2 for additional details). The exfoliation free energies of all MAX phases are negative when terminations are included, and they are more negative with than without terminations. Furthermore, with only a few exceptions, the exfoliation free energies are negative even in the absence of terminations on the resulting MXene. Of the four MAX phases with positive $$\Delta G_{{{{\mathrm{exf}}}}.}^{{{{\mathrm{no}}}}\;{{{\mathrm{T}}}}}$$, namely Mo2GaC, Mn2GaC, Ti2SnC, and V2GaN, none have been reported experimentally. Mo2GaC is an unusual case as our experiments show that it keeps its structural integrity when exposed to HF instead of forming a Mo2C MXene. On the other hand, Mo2Ga2C can be used as a precursor for the Mo2C MXene. The calculations show that the exfoliation is more favorable for Mo2Ga2C than for Mo2GaC, and the reason why only the former is exfoliable is further corroborated when comparing the stepwise etching of these two materials (vide infra). Mn2GaC, on the other hand, completely dissolves in HF. Ti2SnC is a rather notable case, as we have observed that the Ti and C dissolve, while the Sn forms a crystalline structure. Notably, Sn is expected to dissolve at these conditions, but was hypothesized to be stabilized by a thin surface oxide29. Ti2SnC is not only of interest since Sn does not dissolve, but also because the Ti and C do dissolve. Considering that the Ti2C MXene is synthesizable when Al is used instead of Sn as the A element, points towards different mechanisms being in action for Ti2SnC than Ti2AlC. This can be assigned to the relatively weak interaction between Ti and Sn, in combination with the resistance of Sn to be dissolved, which is reflected by the calculations of the initial steps of the etching (vide infra).

Most of the MAX phases that have been successfully etched are found with $$\Delta G_{{{{\mathrm{exf}}}}.}^{{{{\mathrm{with}}}}\;{{{\mathrm{T}}}}}$$ between −0.5 eV per atom and −1.5 eV per atom. However, there are clear outliers and from the data presented in Fig. 1a, it is difficult to draw general conclusions about how we could predict whether a MAX phase is exfoliable or not. Of the studied MAX phases, it seems like a negative $$\Delta G_{{{{\mathrm{exf}}}}.}^{{{{\mathrm{no}}}}\;{{{\mathrm{T}}}}}$$ is a prerequisite for MXene synthesis. However, there is no obvious reason why this would be the case. Furthermore, several materials with a negative $$\Delta G_{{{{\mathrm{exf}}}}.}^{{{{\mathrm{no}}}}\;{{{\mathrm{T}}}}}$$ have not been exfoliated and the thermodynamics of the complete selective etching is not a sufficient descriptor to predict if a MAX phase is exfoliated or not.

The most general scenario for MAX phases which cannot be chemically exfoliated into MXenes is that the entire MAX phase dissolves. The question is whether we can learn something if considering the solvation free energy of the different MAX phases, which is compared on the x-axis in Fig. 1b. Unsurprisingly, in all cases except one, the solvation free energy is negative, and in almost all cases, the solvation energy is lower than the exfoliation free energy. This is not surprising as we know from experiments that MXenes eventually dissolve after sufficient time in solution. Strikingly, however, the solvation free energy of Mo2GaC is positive, corroborating our experiments that this MAX phase keeps it structural integrity in HF aqueous solution.

### Initial steps of the etching of MAX phases

An important aspect when synthesizing MXenes is that (i) the A element can be etched and (ii) atoms belonging to the MXene substructure are not etched; what is referred to as selective etching of the A element. We can hypothesize that the ideal condition for the selective etching would be that the etching of the A element is exergonic (negative reaction free energy) while the etching of the M element is endergonic (positive reaction free energy). To test the validity of this hypothesis, we studied the initial step of the etching, i.e., the free energy of vacancy formation of removing either a single A or M element from a bulk MAX phase; ∆GA and ∆GM defined by Eq. (4). Figure 2a, b depict the results from these calculations comparing ∆GA and ∆GM, considering two sets of the chemical potentials of the A and M elements: in (a) there are no restrictions on the solvated products which can form while in (b) no oxides are allowed to form (the constraint is explained below). For the out-of-plane ordered MAX (o-MAX) phases, ∆GM refers to the removal of the M element with the smallest free energy of vacancy formation. In Supplementary Table 3, we give details of distinguishable ∆GM for different o-MAX phases.

In Fig. 2a, we used the same chemical potentials as for the exfoliation free energies, without any constraint on the ions and molecules which are considered when constructing the chemical potentials. It is found that, except for Mo2GaC, MAX phases in the quadrant for which ∆GA is negative and ∆GM is positive have been reported to be chemically exfoliable, which will be discussed further below. Ti3SiC2 should, however, also be treated as an exception since it has not been successfully exfoliated in HF, but in an aqueous mixture of HF/H2O213. Another question we need to address is why Ta2AlC and Ta4AlC3 are exfoliable in HF while, for example, Cr2AlC is not. The answer may have to do with how kinetically accessible the formation of the various ions and molecules is Cr, forms Cr3+ through the generation of hydrogen gas by donating charge to H+. In the case of Ta, on the other hand, the thermodynamically most favorable form in solution at pH = 0 is $${{{\mathrm{TaO}}}}_2^ +$$, which requires the splitting of two water molecules in the acidic environment.

We can make the notion that the formation of all ions or molecules containing oxygen requires the activation of water molecules, since, at low pH, there is a surplus of H+ and virtually no $${{{\mathrm{OH}}}}^ -$$ ions. For example, it is well-known that HF does not dissolve Si, but requires an oxidant to form SiO2, which is concomitantly etched by the HF30. Therefore, it seems reasonable to make the assertion that ions and molecules containing oxygen are likely not formed, or at least that such processes will be slow. Figure 3b shows the results with the constraint that oxides are not formed during the etching process. Notably, Ta2AlC and Ta4AlC3 have moved into the quadrant of negative ∆GA and positive ∆GM. Furthermore, ∆GM has increased for Ti3SiC2 such that it is well above zero. At the same time, many materials which have not been experimentally etchable in HF stay in the region where ΔGM < 0, such as Cr2AlC, Mn2GaC, and Zr2AlN. Only one anomaly remains, namely Mo2ScAlC2, for which the etching would be favorable for both A and M elements. In the case of the M elements, ΔGM < 0 for Sc while ΔGM < 0 for Mo (Fig. 2 reports the smallest ΔGM obtained for the respective MAX phase). Notably, it has been observed that the Sc may be partly etched from the Mo2ScAlc29, consistent with our calculations. Such a scenario is not possible to account for by only considering the initial etching step.

Among the considered MAX phases which have, to the best of our knowledge, not been tested to be etched in HF, it is predicted that Hf2AlC and V2GaN are not chemically exfoliated since ∆GM is negative even with the constraint in Fig. 3b. This is also the case for Zr2AlC nor Mn2GaC, which were found dissolve completely in our experiments. It should be noted that for Mo2Ga2C, ΔGA is shown for removing two A elements due to the double A layer. In fact, the removal of first Ga is endergonic, but the overall process becomes slightly exergonic as soon as second Ga is removed, which is discussed further below. This is consistent with that the chemical exfoliation of this material proceeds very slowly11.

### The peculiar case of molybdenum gallium carbides

Mo2GaC and Mo2Ga2C are of particular interest as both, in principle, could give rise to the Mo2C MXene, with the difference that in the former phase, the MXenes are separated by a single layer of Ga while in the latter, they are separated by a Ga double-layer. Notably, only Mo2Ga2C has been shown to be chemically exfoliable to yield the MXene. Furthermore, it should be noted that removing only one Ga layer from Mo2Ga2C would yield the chemically inert Mo2GaC. I.e., for the formation of Mo2C from Mo2Ga2C, it is crucial to avoid the formation of Mo2GaC.

The results presented so far have shown that it is easier to selectively etch Mo2Ga2C compared to Mo2GaC, but do not predict only Mo2Ga2C to be exfoliable. The different exfoliability of the two materials becomes evident when comparing the stepwise removal of an entire Ga layer (double layer in the case of Mo2Ga2C), as depicted in Fig. 3. For Mo2GaC, the process is endergonic during the initial steps and the free energy increases up to ~30% of the completed exfoliation of the A layer. When considering Mo2Ga2C we see that the free energy increases for removing the first Ga atom but is then lowered throughout the process. Notably, for this material, we see a four-step cycle repeated in the energy profile: (i) removal of Ga (energy increases); (ii) removal of Ga (free energy decreases); (iii) add O (free energy decreases); and (iv) add O (free energy decreases). The two Ga atoms that are removed in each cycle come from each of the two Ga layers. This process is favorable compared to subsequently removing Ga atoms from the same layer (which would inevitably result in the Mo2GaC MXene), as demonstrated in Supplementary Fig. 6.

It should be noted that we make the approximation that the etching starts from inside the MAX phase. This is sufficient to study trends for how easy it is to etch A compared to M elements, and the relative strength of the bonding in the two molybdenum gallium carbides. To enhance the understanding of the etching of a MAX phase further it would also be of interest to study how the etching proceeds from grain boundaries. Modeling this would require a detailed characterization of the grain boundaries, beyond the scope of the current study.

## Discussion

In light of the results discussed so far, it is tempting to investigate if the family of MXenes, synthesized through the selective etching of MAX phases in HF, could grow further, by expanding our analysis to the entire parameter space of MAX phase compositions. The easiest way of assessing this is by considering how easily different A and M elements dissolve when being in their elemental reference phases. In Fig. 4, this is demonstrated, both when considering all different molecules and ions of the respective element in an HF solution (Fig. 4a, b) and when excluding molecules and ions containing oxygen (Fig. 4c, d) in the analysis. First, it is easy to understand the success of etching Al, as it has the most energetically favorable solvation of all A elements, particularly under the constraint of no oxides. Furthermore, the results show that Mo does not dissolve even when taking oxide formation into account, while Nb and Ta do not dissolve under the constrain of no oxides, making these three the most suitable M elements. Sc, Zr, and Hf, on the other hand, has the by far most negative solvation energies among the M elements. For Zr and Hf, this is possibly what hinders the synthesis of MXenes with these elements, and if a ternary MAX phase with Sc existed it would probably not be exfoliable in HF. In the case of Ti, V, Cr, and Mn, the solvation energies are in the middle ground. If the interaction with the X element is strong enough, their solvation could be hindered. This is reflected by our calculations, as the titanium carbides are predicted to be synthesizable in HF, while the titanium nitrides are not (see Fig. 3). It is quite striking that by using experimental formation energies of molecules and ions in aqueous solution, known for half a century, we can paint the broad picture of MXene synthesis in HF. From this broad picture, it is possible to choose which material to study in more detail with first-principles calculations. Surely, this is a result that we can learn from to reduce the computational effort when screening for new materials that could be formed by chemical exfoliation.

In summary, we have studied the chemical exfoliation of MAX phases to MXenes in HF by combining first-principles DFT calculations with tabulated formation energies of molecules and ions in an aqueous solution, under the assumption that the processes comply with the concept of electroneutrality. The calculations were compared to what is already known about the etching of the MAX phases from the literature, as well as to previously unpublished data of unsuccessful etching attempts. It was found that the process of selective etching of all MAX phases is thermodynamically favored when the adsorption of terminations groups on the resulting MXenes is taken into account. This criterion needs to be fulfilled for etching but is not sufficient to predict exfoliability. Therefore, to understand why some MAX phases are exfoliable, while others are not, we considered the initial etching step, by comparing the free energy difference of removing an A element and an M element. Under the constraint that the M and A elements do not dissolve through the splitting of water molecules, we can understand why certain MAX phases are exfoliable, while others are not. Generally, for the MAX phases that are chemically exfoliable, the removal of an A element is thermodynamically favorable, while the removal of an M element is thermodynamically unfavorable. We also showed why Mo2Ga2C is exfoliable (although slowly) while Mo2GaC is not, by studying the energetics of the complete etching process, step-by-step, for which it was found that the exfoliation of Mo2GaC becomes exergonic first after ~30% of the etching is completed, while it is favorable already from the start for Mo2Ga2C. Finally, we discussed the etching probability of MAX phases in general by considering the solvation free energies of all possible A and M elements compared to their respective elemental reference phases. Strikingly, such a comparison gives a broad picture of which MAX phases are exfoliable and which are not, although the first-principles calculations are needed to provide the details. As our results concern the particular case of HF, it would be of great interest to investigate the etching behavior of MAX phases in other environments. There is no reason to question that the approach presented in this work can also be adopted for other situations, and we anticipate that the method will play a crucial role for the computational screening of materials that can be chemically exfoliated into novel 2D materials.

## Methods

### Computational details

The calculations were performed with the framework of periodic density functional theory as implemented in the VASP code31. The projector-augmented wave (PAW) method32,33 was used together with a plane-wave basis set expended to a kinetic energy cutoff of 520 eV, and the Perdew–Burke–Ernzerhow (PBE) functional34 was used to describe exchange-correlation effects. The k-point sampling was set such that the distance between k points in the first Brillouin zone was smaller than 0.2 Å−1. For all systems, spin-polarized calculations were performed, considering one ferromagnetic and two different antiferromagnetic (in-plane and out-out-plane) configurations for the initial magnetic moments of the transition metal atoms. To facilitate calculations of in-plane antiferromagnetic ordering, a p(2 × 2) unit cell in the “MXene plane“ was used in all calculations of defect-free MAX phases and MXenes. Furthermore, the MXenes were represented in a unit cell with at least 15 Å of vacuum region perpendicular to the MXene planes to have negligible interaction between periodic images. The MXenes were calculated both with and without surface terminations. Calculations with both oxygen and fluorine terminations were performed, and both hollow sites were considered for each MXene-termination combination. For the calculations of the stepwise etching of A and M elements, a corresponding p(4 × 4) unit cell in the “MXene plane” and an out-of-plane unit cell comprising two MXene units and, consequently, two A layers, was used to minimize vacant sites interacting over periodic images.