An explicit formula for the toric h-vector of an Eulerian poset in terms of
the cd-index is developed using coalgebra techniques. The same techniques
produce a formula in terms of the ag h-vector. For this, another proof base
d on Fine's algorithm and lattice-path counts is given. As a consequence, i
t is shown that the Kalai relation on dual posets, g (n/2)(P) = g(n/2)(P*),
is the only equation relating the h-vectors of posets and their duals. A r
esult on the h-vectors of oriented matroids is given. A simple formula for
the cd-index in terms of the ag h-vector is derived.