In places that aren’t tropical, silica is the main part of sand, so the chemical formula for sand is SiO2. In silica, there are twice as many silicon atoms as there are oxygen atoms.
Most of the time, this silica is in the form of quartz in sand. Quartz is made up of atoms of silicon and oxygen. Each silicon atom is connected to four oxygen atoms, and each oxygen atom is connected to two silicon atoms.
In some places, calcium carbonate is also a part of the sand. CaCO3 is the chemical name for calcium carbonate.