Whewellite is possibly the best known of the crystalline organic minerals. Amber, which is quite well known, is often placed in the Organic Minerals Class, but it lacks a crystalline structure. Some mineral purists might not agree that whewellite is a mineral at all as they tend to dislike any organic connection to minerals (see annapaite). In the example of whewellite, not only is there a connection but organic chemicals are right in the formula! As long as one can ignore the organic chemical connection, whewellite is its own mineral because it is naturally formed, a crystalline solid (repetitive), formed with no direct biological connection and composed of a set chemical formula.
Whewellite is the salt of oxalic acid (also known as ethanedoic acid). The formula for oxalic acid is H2C2O4. The calcium in whewellite has replaced the hydrogens in the oxalic acid by the following reaction with calcium hydroxide:
H2C2O4 + Ca(OH)2 -----> CaC2O4 - H2O + H2O
This reaction produces molecules of hydrated calcium oxalate (whewellite if in crystalline form) and water. The oxalic acid is a fairly stable molecule as organic chemicals go and the calcium hydroxide can be produced in basic ground water or in hydrothermal fluids. So all that is needed is a source of oxalic acid to produce the mineral whewellite. The source is undoubtedly organic and can come from coal or organic debris in sedimentary rocks. In deed, whewellite is found in some coal seams and sedimentary nodules and concretions. In has also been found in some hydrothermal veins (source of the oxalic acid is uncertain) and even forms upon dead agave plants in Arizona's southwestern deserts. In the later occurrence whewellite would certainly not be considered a mineral due to its most non-geological origin but the other occurrences are all up for debate.