TITLE: Class number measuring the failure of unique factorization
QUESTION [27 upvotes]: The statement that the class number measures the failure of the ring of integers to be a ufd is very common in books. ufd iff class number is 1. This inspires the following question:
Is there a quantitative statement relating the class number of a number field to the failure of unique factorization in the maximal order - other than $h = 1$ iff $R$ is a ufd?
In what sense does a maximal order of class number 3 "fail more" to be a ufd than a maximal order of class number 2?
Is it true that an integer in a field of greater class number will have more distinct representations as the product of irreducible elements than an integer in a field with smaller class number?

REPLY [3 votes]: I know I'm late to the party, but it seems to me the other answers don't directly answer the last part of the question:

Is it true that an integer in a field of greater class number will have more distinct representations as the product of irreducible elements than an integer in a field with smaller class number?

No.  Of course it's not necessarily true that a given integer in two fields $K_1 \cap K_2$ will have more distinct factorizations in $K_1$ than $K_2$ if $h(K_1) \ge h(K_2)$.  But even in simple situations where you could hope for this to be true, the opposite behavior can happen. 
In this paper, I gave a combinatorial expression for the number $\eta(x)$ of distinct factorizations of $x \in \mathcal O_K$ ($K$ a number field) in terms of the ideal classes of $\mathfrak p_i$ and the exponents $e_i$, where $x \mathcal O_K$ has prime ideal factorization $\prod \mathfrak p_i^{e_i}$.  There is also a precise description of the structure of distinct factorizations, which makes it clear that the structure of the distinct factorizations can get more complicated with more complicated class groups.  (In particular, you can use this description to get Carlitz's theorem and related results.)
But to return to your question, here is an example where you can describe $\eta(x)$ simply.  Suppose $K$ is quadratic, $x=p$ is a rational prime and $\mathfrak p$ is the prime ideal of $\mathcal O_K$ above $p$, then for any $n \in \mathbb N$,
$$ \eta(p^n) = \begin{cases}
1 & \mathfrak p \text{ principal or $p$ ramifies} \\
\lfloor \frac nm \rfloor + 1 & \text{else},
\end{cases} $$
where $m$ is the order of $\mathfrak p$ in the class group.  
In particular, suppose $K_1$ and $K_2$ are quadratic fields with class numbers 3 and 2 respectively, and $p$ is rational prime unramified in both $K_1$ and $K_2$.  Let $\mathfrak p_1$ and $\mathfrak p_2$ be primes of $K_1$ and $K_2$ above $p$.  Then $p^n$ (for any $n > 3$) has more distinct factorizations in $K_2$ (a class number 2 field) than $K_1$ (a class number 3 field) if and only if $\mathfrak p_2$ is not principal.