you might start with the layout
package in an otherwise empty document,
with the document class and page geometry you'll be using. the single command
\layout
will produce a diagram with the current values of the various dimension
components. that won't give exactly the answer you want, but should provide the
information you need to calculate it.
edit:
i can't think offhand how this might be done automatically, so i'd experiment.
on a page by itself, using the intended document class, insert a figure
environment,
some \hrule
s to delimit the area, and include the actual caption. here's an example
that will give a result that is larger than the area actually available, but the log
file will say by how much it's too large, and since this layout allows everything to
be measured, some fairly simple calculations should result in the length you're looking for.
\documentclass{book}
\usepackage{layout}
\begin{document}
\layout
\begin{figure}[p]
\centering
\hrule
\vspace{\textheight}
\hrule
\caption{this is the caption for the figure in question.
we don't know how much space it's going to take, so we
want to measure it, so that the figure itself can be made
as large as possible.}
\hrule
\end{figure}
\end{document}
the report in the log for this example is
LaTeX Warning: Float too large for page by 44.08887pt on input line 19.
according to the \layout
diagram, the \textheight
is 550pt. subtracting the
44pt reported in the log, the available height for the image should be 506pt, and
the width is the \textwidth
. (the thickness of the three rules is ignored here,
but if it really matters, that's another 1.2pt.)