塞翁失马
sài wēng shī mǎ
Literally: “frontier old man loses horse”
A loss may turn out to be a blessing; good and bad luck can change places.
English has a similar saying: a blessing in disguise
The story
An old man lived near the northern frontier. One day his horse ran away across the border, and his neighbors felt sorry for him. “Who knows? This may be good luck,” he said. Months later the horse came back, bringing a fine horse from the north with it. When the neighbors congratulated him, he said it might bring trouble. Soon his son, who loved riding, fell off and broke his leg. A year later, war came, and nine in ten men near the frontier died, but the lame son did not have to fight. Luck can always turn.
Source: Huainanzi
How to use 塞翁失马
Used to comfort someone after a setback, or to say a loss may lead to something good. Often followed by 焉知非福 (who knows it isn't a blessing?).
Example sentences
没赶上那班飞机也许是塞翁失马,别太难过了。
Méi gǎn shàng nà bān fēi jī yě xǔ shì sài wēng shī mǎ, bié tài nán guò le.
Missing that flight might turn out to be a blessing in disguise. Don't be too upset.
他丢了工作,后来却开了自己的店,真是塞翁失马。
Tā diū le gōng zuò, hòu lái què kāi le zì jǐ de diàn, zhēn shì sài wēng shī mǎ.
He lost his job but then opened his own shop — a real blessing in disguise.