Caption Size Ratio To Body
Measured captionPx to body size ratio, not an accessibility or style prescription.
Description
Calculate caption size divided by body-text size.
Caption size relative to body text is one design parameter in a type hierarchy. This calculator reports the ratio of two declared positive pixel sizes.
When to use this tool
Calculate caption size divided by body-text size. Use it when the input measurements and conventions below match the operation you need.
- Prepare captionPx, bodyPx, respecting the measurement basis and boundaries below.
- Compare the worked example with your intended operation before reusing its result.
How to use the tool and how it works
- Enter every field in the input table using the stated units and exact supported selector spelling where applicable.
- Run the tool. Correct input errors before interpreting an output.
- Read the result fields below; use accompanying flags and the stated sign, boundary or model convention when interpreting a number.
captionPx and bodyPx must be positive. sizeRatio equals captionPx divided by bodyPx.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| captionPx | Caption px. Pixels. | Finite number; greater than zero |
| bodyPx | Body px. Pixels. | Finite number; greater than zero |
| Output field | Interpretation |
|---|---|
| result | Object containing the following named result fields. |
| result.sizeRatio | Size ratio; use the stated units and sign convention. |
{
"input": {
"captionPx": 12,
"bodyPx": 16
},
"output": {
"result": {
"sizeRatio": 0.75
}
}
} Limitations and assumptions
- The ratio does not measure perceived size, line height or readability. No font or rendered caption is inspected.
- Every declared field is required and unexpected fields are rejected. Numeric inputs must be finite; input errors are distinct from a valid false result or an explicitly qualified output.
- Extremely large inputs and nonfinite or excessively large outputs are rejected. List positions reported by the tool use zero-based indices unless stated otherwise.
Alternative or Complementary methods
Compare the metric calculation with the intended font and rendered text. Font shaping and layout inspection are more appropriate when the task depends on actual glyph positions or reading conditions. Compare the scope of the nearby tools below before substituting one.
References
Similar or alternative tools
- Footnote Size Ratio To Body
Measured footnotePx to body size ratio, not an accessibility or style prescription.
- contrast ratio text size threshold checker
Contrast requirements depend on text size and weight as well as measured contrast.