Foundations
The starting point is the general heat exchanger equation below.
$$\dot{q} = U A \Delta T_{LM} $$
Here, $\dot{q}$ is heat flow (J/s = W), $U$ is the overall heat transfer coefficient of the system (W/m$^2$ $^o$C), $A$ is the tube area (m$^2$), and $\Delta T_{LM}$ is the log mean temperature through the exchanger ($^o$C).
The next equation is the energy balance on the fluid.
$$ \dot{q} = \dot{m}\tilde{C}_p \Delta T $$
Here, $\dot{m}$ is the mass flow (kg/s) and $\tilde{C}_p$ is the specific heat of the fluid in the pipe (J/kg $^o$C).
Approach
Reasonable values for the overall heat transfer coefficient $U$ can be obtained using charts or correlation tables in a range of textbooks on heat transfer equipment or from on-line sources. Exact values are only obtained by measurements on the final working system.
The value of $A$ is obtained by geometry along the tube. For a tube of length $L$ and external radius $r$, the external tube area is $2\pi r L$.
The specific heat and flow rate of the fluid in the tube are supposedly known.
Assign the temperature of the external fluid as $T_\infty$ and the inlet temperature as $T_i$. You end with one equation and one unknown, the outlet temperature $T_o$.
$$ U A \frac{\left(T_i - T_o\right)}{\ln\left(\frac{T_i - T_\infty}{T_o - T_\infty} \right)} = \dot{m}\tilde{C}_p \left(T_o - T_i\right)$$
Use this to estimate the output temperature of the fluid through the tube. Alternatively, use this to determine what tube length you need to get a desired temperature.
Example
Recast the above as a dimensionless equation with $\Theta = (T_o - T_\infty)/(T_i - T_\infty)$ and $\beta = U/\dot{m}\tilde{C}_p$.
$$ \Theta = \exp(\beta\ A)$$
Here is a plot of $\Theta$ versus $A$ for values of $\beta$ of 1 (lower right black), 3, and 10 (upper left red).

Estimates with Variations (Uncertainties)
Variations (uncertainties) in $\beta$, $A$, and $\Theta$ can related through linear uncertainty propagation.
$$ \left(\frac{\Delta \Theta}{\Theta}\right)^2 = \beta^2 \Delta^2 A + A^2 \Delta^2 \beta $$
By example, when you know the area precisely, $\Delta A = 0$. When you have a 10% uncertainty in $\beta$, this translates to an estimate of the relative uncertainty in $\Theta$ as
$$ \left(\frac{\Delta \Theta}{\Theta}\right) = 0.10\ \beta A $$
In plain English, when you know the area of the exchanger, the relative uncertainty in the output temperature increases linearly with the area and effective heat transfer function. Larger heat exchangers will have greater uncertainty in their end temperature, as will exchangers with low flow or high heat transfer coefficient.