The valency of carbon is +4.
As the atomic number of carbon is 6, it has a total of 6 electrons in one atom arranged in the following configuration.
Electronic Configuration of Carbon [126C612C] = 1s2 2s2 2p2 1s2 2s2 2p2
Evident from its electronic configuration, the outermost p orbital contains a total of 4 electrons, and to gain a configuration similar to its nearest noble gases,
[2010Ne1020Ne] = 1s22s22p61s22s22p6
or
[42He24He] = 1s21s2
it needs to add 4 more electrons to the 2p sub-shell, or lose 4 electrons from the 2s and 2p sub-shells.
what is the valence of carbon in carbene (CH2) or of the non-carbonyl carbon in the cluster compounds Fe5(CO)15C and Ru6(CO)18C? In the Fe compound, the unique carbon is in the center of the base of a square pyramid of iron atoms and that carbon is bound to all 5 of them. In the Ru cluster, the unique carbon is in the center of an octahedron of Ru atoms, and that carbon is bound to all 6 of them.
Carbon also has variable valency