Possible elementary reaction steps in dehydrogenative polymerization of silanes have been studied by nonlocal density functional calculations. The reaction steps involve silylation L(n)M-H + SiH4 --> L(n)M-SiH3 + H-2 (1), and the silicon-silicon bond forming step, L(n)M-SiH3 + SiH4 --> L(n)M-H + Si2H6 (2). For the model system L(n)M = Cl2Sc, step (1) has a calculated enthalpy of 3 kJ/mol and a calculated activation energy of 7 kJ/mol whereas step (2) has an enthalpy of 10 kJ/mol and a negative activation energy of - 11 kJ/mol. It is concluded that the mechanism proposed in the literature for dehydrogenative polymerization of silanes in terms of the steps (1) and (2) is feasible for L(n)M = Cp2M with M = Sc, Y, La, Lu and Sm. Studies were also carried out on the corresponding steps involving carbon rather than silicon. It was found that the carbon-carbon bond forming process analogous to (2) has an activation energy of 132 kJ/mol and it is suggested that the reaction between L(n)M-CH3 and CH4 instead leads to the methyl exchange process L(n)M-CH3 + CH4 --> L(n)M-CH3 + CH4 with an activation energy of 33 kJ/mol for L(n)M = Cl2Sc.