  The paper addresses the study and applications of a broad class of
extended-real-valued functions, known as optimal value or marginal functions,
which are frequently appeared in variational analysis, parametric optimization,
and a variety of applications. Functions of this type are intrinsically
nonsmooth and require the usage of tools of generalized differentiation. The
main results of this paper provide novel evaluations and exact calculations of
regular/Fr\'echet subgradients and their singular counterparts for general
classes of marginal functions via their given data. The obtained results are
applied to establishing new calculus rules for such subgradients and necessary
optimality conditions in bilevel programming
