Picture framing: Cutting frames on the mitre saw

My hands are no longer what they were so I wish to use a powered mitre saw instead of my trusty old Nobex.

Is there a “formula” to calculate the cutting length of a picture frame that takes account of the length of the picture edge, the rebate and the kerf?

Ideally I would like to measure the smaller of the finished edge on a jig I’ve made.