(The angle shown at the entry point is calculated using Snell’s law)

I’m trying to avoid casting as many rays as possible. 100% accuracy and efficiency is my goal, however, it’s alright if I have to cast an extra ray or two, if absolutely necessary of course.
I’m hoping there’s some weird mathy solution for this, and it needs to work on any shape (sphere, cube, cylinder, etc.).
I haven’t tried much with this, but I have thought of overshooting a ray and shooting another back to get the place where it exited, but that sounds very expensive and inaccurate, because the part might be complex and it could overshoot it too much.

I think the best solution would be essentially what you already said by taking another ray.

You would only need one more ray.
The origin of this ray would need to be entryPoint + directionOfRefraction*(hitPart.Size.magnitude+0.01)
Then you can just cast back towards the entryPoint

The hitPartSize magnitude plus the small number would handle the worst case scenario of it being opposite corners for entry and exit, so everything should work with those numbers for a single object. But it is limited to only working with convex shapes

I don’t think it’s possible to get a ray to collide with an object it starts inside making it hard to get the exact position on more complex shapes like unions and meshes, but the default roblox part shapes should all work.

You could calculate it with a sinus, cosinus and tanus rule called, Trigonometic Ratios (but you’ve to calculate it twice as it’s 3 dimensional and not 2 dimensional!)

You got the “adj” (aka the size of the object you hit) and the degrees/radiants
Note if you calculate this e.g. with google tell the calculator if you’re using radiant/degree (tho I think tlr22’s solution would be better in this case, as this wouldn’t work for a few cases)
Good luck!