What is a rectangular-base wedge?
A wedge in this calculator is a solid with a flat rectangular base of length a and width b. At a height h above the base sits a horizontal top edge (the ridge) of length c, running parallel to the base side of length a and centered over the rectangle. Sloping faces connect the base to the ridge. When c equals a the shape becomes a triangular prism; when c shrinks to 0 it becomes a pyramid whose apex is a line.
How to use it
Enter four lengths in the same unit: the lower base a, the base width b, the upper edge c, and the height h. All values must be non-negative. The calculator returns the volume in cubic units and both the lateral and total surface area in square units. Because every input shares one unit, no conversion is performed; if you measure in cm the volume is in cm³ and areas in cm².
The formulas explained
The volume is $$V = \frac{b \cdot h}{6}\left(2a + c\right).$$ The lateral area $$A_{L} = \frac{a + c}{2}\sqrt{4h^{2} + b^{2}} + b\,\sqrt{h^{2} + (a - c)^{2}}:$$ the first term covers the two sloping faces parallel to the a-direction, the second covers the two end faces. Total surface area $$S = A_{L} + a \cdot b$$ adds the rectangular base. Note \((a - c)\) is squared, so it does not matter whether the ridge is longer or shorter than the base.
Worked example
For \(a = 4\), \(b = 3\), \(c = 3\), \(h = 5\): $$V = \frac{3 \cdot 5}{6}(2 \cdot 4+3) = 2.5 \cdot 11 = \mathbf{27.5}.$$ $$A_{L} = 3.5 \cdot \sqrt{109} + 3 \cdot \sqrt{26} \approx 36.541 + 15.297 = \mathbf{51.838}.$$ $$S = 51.838 + 12 = \mathbf{63.838}.$$
FAQ
What if the top edge is longer than the base? That is allowed. The end-face term uses \((a - c)^{2}\), so a longer ridge gives a valid positive area.
What happens when h = 0? The solid collapses: \(V = 0\), the surface area reduces to \(a \cdot b\), and the lateral term simplifies to \(b \cdot |a - c|\).
Do I need to pick a unit? No. All inputs use one shared linear unit, so outputs are simply that unit cubed (volume) and squared (areas).