"ence" is often used when the root word comes from a Latin word ending in "entia" or "enti".
Examples:
* Absence (from the Latin "absentia")
* Presence (from the Latin "presentia")
* Confidence (from the Latin "confidentia")
* Difference (from the Latin "differentia")
"ance" is often used when the root word comes from a Latin word ending in "antia" or "anti".
Examples:
* Importance (from the Latin "importantia")
* Guidance (from the Latin "gubernantia")
* Assistance (from the Latin "assistentia")
* Distance (from the Latin "distantia")
However, there are exceptions to these general rules:
* Some words that end in "ence" are derived from French words. Examples: "influence," "innocence," "excellence."
* Some words that end in "ance" are derived from words that don't follow the Latin pattern. Examples: "advance," "chance," "romance."
The best way to learn the spelling of words ending in "ence" or "ance" is to simply memorize them.