you will have to think about it in the shape of the object you want. A Circle is easiest but typically a PVC green house will be some kind of oval shape. For that, you might just have to estimate, since I don't know a formula for it, but you can get an idea from using the circle. Make the PVC pipe longer or shorter depending on the shape you wanted (as long as it reaches the other rebar).
But using the circle as an example, and assuming a 4x4 raised bed (which you cover to become a kind of green house).
The diameter is 4 ft (the size of the bed). If you wanted a "perfect" circle shape, the length of the PVC to go from rebar to rebar is 1/2 (2 * pi * r). (ie, half of the circumference of the circle)
So 1/2 (2 * 3.14 * 2) = 6.3 feet.
If you want the top of the loop to be a little higher, meaning more oval, make it 8 feet or 10 feet. From my personal experience, a 10-foot PVC pipe fits well for a 4x4.
But of course your greenhouse may have different measurements, so just use the same formula to find the length you may need.