I have been riding indoor on spin bike and I average 40 km/h, would someone help me translate these speed to outdoor cycling?
I'm going to let you answer your own question - Think how tired you are after an hour on the spin bike, and compare that with how tired you are after an hour on the road bike.
Work in some fudge factors based on
the amount of headwind/tailwind you had (ride out and back on the same route)
Number of stops for traffic lights or road signs... getting going again from stopped adds to the workload and decreases your average.
Grade - try and road bike a flat path with minimal climbs or descents.
Afterwards subjectively compare, and I'd estimate a 25 km/h road ride ~= your 40 km/h trainer ride.
Based (very roughly) on this calculator here, I'll guess 28 km/h or less.
Using a 0 weight rider and bike with no wind and 200 watt output you get roughly the speed you are getting on the trainer (the weights are used for rolling resistance). Leaving the power the same and changing to 80kgs, a 9kg bike and 15 km/h wind it gives 28 km/h which is a significant drop. I am not sure about all the formulas the calculator is using, but introducing rolling resistance and wind resistance will surely take big chunks out of that speed.
I am not sure what kind of spin cycle you are using, but depending, it may be introducing some sort of resistance that it equates to rolling/wind/mechanical resistances. However, it's likely much less than what you would encounter out on the road.