You both are really lucky then.
Let's say two people A and B, explains a situation (something bad) to C, and C tells them how lucky they are to escape from that bad situation. Now C responds, "You both are really lucky then."
What C is trying to say is that, as they escaped from a worse situation while many others didn't, they are lucky.
Now, is then at the end of the sentence grammatically correct or wrong? My doubt here is whether a sentence can end with then.