Both the singular value decomposition (SVD) and the QR factorization play central roles in signal processing algorithms. The usual tradeoff is that the SVD is more expensive but can reveal rank more reliably. In this paper, we show how to construct a QR factorization which can also reveal the rank reliably. For matrices with low rank deficiency, the overhead over the usual QR procedures is negligible. It also appears possible to implement the new procedure in systolic arrays.