I use this priming sugar calculator from the northernbrewer website.
For beer temp I use the temp in the bottling bucket assuming by the time I start filling bottles that will be a few degrees warmer than fermentation temp. I mostly brew ales and don't mess with cold crashing. I think if I did cold crash the beer before bottling I wold use the fermentation temp instead of the bottling bucket temp since probably very little additional CO2 would be expected to be generated and dissolved during cold crash.
Lagers may be a different story. Seems possible over a 6 to 8 week lager you might get some additional CO2 dissolved. Or you might not and no good way to know. if you bottle based on primary fermentation temp or ecen worse diactyl rest temp and you did disolve more CO2 during bottling, then you
Probably over carb... so for lagers I take the fermenter out of the lagering fridge day before bottling and let temp rise. As the temp rises the dissolved CO2 comes out of solution and you can use the temp in the bottling bucket.