The following rule (or 'rule', this being English) is sometimes quoted:
If a word has two or more syllables, double the final consonant when adding a suffix if and only if the final syllable is stressed in speech.
(There's also constraints about not doubling h, j, q, v, w, x, y (here), but that's not relevant in this case.)
So for example we have
begin \bi-ˈgin, bē-\ → beginning
prefer \pri-ˈfər\ → preferred
listen \ˈli-sᵊn\ → listening
happen \ˈha-pən, -pᵊm\ → happening.
By that logic, we should have
histogram \ˈhi-stə-ˌgram\ → histogramed, histograming.
The trouble is, that's mostly not what people actually do; see the google books Ngram, below. Moreover, Wiktionary says that it is histogrammed/histogramming (here) .
Unfortunately, the major dictionaries do not list histogram as a verb; in particular, the OED doesn't. But in the sciences, people do use it—both with the doubling of the m (here) and without (here). However, the double-m version is 10-20 times more common, according to this google books Ngram:
(A very similar Ngram is obtained for histogramming,histograming.)
Did I state the rule (or 'rule') about the consonant doubling correctly? Here is an example of how simple, often-repeated rules may in reality be simplified versions of more complex actual rules: the source I linked above (as well as many others) says that for single-syllable words, the final consonant is doubled if the vowel is short. But according to John Lawler (here), the actual rule is a bit more convoluted: if the vowel was short in Middle English (/ɪ ɛ æ ɔ ə/) and it uses only one vowel letter and it's in a syllable ended by a consonant, then you double the consonant in spelling. Is there a similarly more complicated rule for multi-syllable words? If so, what does it say about histogramed/histogrammed ?
Imagine you had to use the past tense of histogram in a text. What would you write?
(3. What was this 'histogramming craze' in the early '80s?)
The Free Dictionary has the following discussion:
Exception 1: Doubled consonants in unstressed syllables
Note that there are several words that have primary emphasis on the first syllable but have doubled consonants when taking vowel suffixes. Most of these have a secondary stress on the last syllable, which might be part of the reason why their final consonants are doubled, but this is not always the case.
The situation is made more difficult by the fact that many of these words have variant or accepted alternative spellings in which the final consonant isn’t doubled, and the preference for some of these variants often comes down to regional dialect. This leads to confusing spelling decisions such as kidnaped vs. kidnapped and worshiped vs. worshipped. Unfortunately, we just have to memorize these exceptions:
crystal \ˈkri-stᵊl\ → crystalline, crystallize (but also crystalize; crystalline has only one spelling)
input \ˈin-ˌpu̇t\ → inputted, inputting
kidnap \ˈkid-ˌnap\ → kidnapped, kidnapping (in AmE also kidnaped, kidnaping)
program \ˈprō-ˌgram, -grəm\ → programmable, programmed, programmer, programming (but also programed, programing)
worship \ˈwər-shəp also ˈwȯr-\ → worshipped, worshipper, worshipping (in AmE also worshiped, worshiper, worshiping)