How to factor in a pension ?

Hello everybody,
Is there a mathematical way to factor in a pension to refine my investing goals?
Let’s say (to make the calculations easier) that it is $10.000/yr guaranteed. How should I integrate it in my calculations? Is it equivalent to having $250.000 invested in stocks (I’m thinking about the equivalent of a theoretical 4% withdrawal rate)
Thanks for any thoughts on the subject!