press space d is the red line and a is the side length. all measures in inches.
I made this to help with my homework, maybe it will help you rectangular prism diagonal calculator and cube side calculator coming soon!