Convert a pixel value to a percentage of its parent's width, so a fixed element becomes fluid. Percent widths let columns and images flex with the viewport instead of overflowing on small screens. Enter the pixel size and the parent width, and the tool returns the exact percentage to drop into your CSS.
Percentage widths shine for fluid layouts that adapt to any container — a 50% width column always takes half its parent, regardless of viewport size. Use them for grid columns, two-column layouts, and elements that should scale with their parent. For viewport-scaled layouts use vw/vh; for content-scaled use rem/em. This calculator helps when a designer hands you a 720px element on a 1440px design and you need to know it's 50%.
Use the actual parent container's width — the element whose width=100% the percentage will resolve against. The default 1440 matches common desktop design widths (Figma's default). For tablet designs, try 768; for mobile, try 375 or 414. The calculator updates the conversion instantly when you change the base, so you can flip between design sizes.
Not for every property. Width, max-width, min-width, left, right, padding-left/right, margin-left/right, and text-indent resolve against the parent's content width. Height, top, bottom resolve against the parent's height (and only if the parent has an explicit height). Padding-top/bottom and margin-top/bottom resolve against the parent's width too (a common gotcha). This calculator is geared to width-based percentages, which is the most common use case.
Four decimal places — much higher than browsers can render. Modern browsers round percentages to sub-pixel precision (typically 1/60th of a pixel on most displays), so values like 33.3333% are effectively identical to 33.33%. The extra precision is useful when chaining calculations or when the parent itself is fractional (such as a 33% column of a parent that's already a percentage).
Converting pixels to percentage requires a known parent container width. The formula is: percent = (px / parentWidth) × 100. The parent width defaults to 1440px (common full-HD viewport) but is user-configurable. This is essential for fluid layouts where elements must be sized as fractions of their container rather than fixed pixel values.