No way to do it by measurement that I'm aware of as every make and model of dryer is different. We went to Walmart, got a piece of foam core poster board, taped it in the back wall and then placed our dryer in position and shoved it back with enough pressure to indent the board. In my case, I needed the hole through the wall directly behind the unit so this worked well.
Don't know if that helps you, but that's how I did ours.
Vaughan & Tracy 2013 RW 36RL, 2013 F350 DRW CC, 2016 Focus. MorRyde IS, MorRyde pinbox, disc brakes, Comfort Ride Hitch. "Life is to be embraced, Grab it with both arms ! "