It is well-known that knowledgebases may contain inconsistencies. We provide a framework of measures, based on a first-order four-valued logic, to quantify the inconsistency of a knowledgebase. This allows for the comparison of the inconsistency of diverse knowledgebases that have been represented as sets of first-order logic formulae. We motivate the approach by considering some examples of knowledgebases for representing and reasoning with ontological knowledge and with temporal knowledge. Analysing ontological knowledge (including the statements about which concepts are subconcepts of other concepts, and which concepts are disjoint) can be problematical when there is a lack of knowledge about the instances that may populate the concepts, and analysing temporal knowledge (such as temporal integrity constraints) can be problematical when considering infinite linear time lines isomorphic to the natural numbers or the real numbers or more complex structures such as branching time lines...