Skip to content
Tutorials Center
My learning

Topics

Lesson 3 of 36 ยท Getting Started

Design Basics: Pixels, Units, Grids and Spacing

Learn the screen math behind every Figma design: pixels, density and @2x exports, the 8-point spacing system, column grids and layout grids, with runnable stand-in code.

Figma lets you place anything anywhere, which is exactly why beginners produce designs that feel "off" without knowing why. Professional interfaces rest on a few simple numeric habits: consistent units, a spacing scale, and grids. This lesson gives you the vocabulary and the math, so every later chapter makes sense.

Pixels, points and density

In Figma every measurement is in pixels (px). A design frame 390 px wide is meant to represent a phone screen that is 390 logical pixels wide. Modern screens have more physical dots than that, which is described by pixel density (also called scale factor or device pixel ratio):

  • @1x: one design pixel equals one physical pixel.
  • @2x: one design pixel is a 2 by 2 block of physical pixels (common on laptops and phones).
  • @3x: a 3 by 3 block (many phones).

You design once at 1x, and export at 1x, 2x or 3x when you need an image. A vector keeps looking sharp anyway; the scale only matters for raster exports such as PNG.

Android measures in dp and iOS in points; in practice you can treat 1 design pixel as 1 dp or 1 pt, and developers handle the density.

Python Stand-in: export sizes at different scales

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice that a 24 px icon becomes 72 px at 3x: it covers more physical pixels but still occupies the same visual size.

Whole numbers keep edges crisp

If a rectangle starts at x = 10.5, the edge falls between two physical pixels and looks fuzzy at 1x. Prefer whole-number positions and sizes. Figma's inspector shows X, Y, W and H; a quick scan for decimals is a good habit, and you can switch Snap to pixel grid on in the view settings so that things land on whole pixels while you drag.

The 8-point spacing system

Many design teams choose spacing and sizes from a short list based on multiples of 8: 8, 16, 24, 32, 40, 48 and so on (with 4 allowed for tight details). Why bother?

  • Consistency: fewer arbitrary values, so layouts look related.
  • Speed: you stop deciding whether a gap should be 13 or 14.
  • Easy translation: developers use the same scale in code.
  • Density-friendly: multiples of 4 and 8 divide cleanly at @1.5x and @2x.

The spacing scale

4 px Tight details
8 px Inside small parts
16 px Standard padding
24 px Between groups

Pick from the scale, not from thin air

1 / 2
Python Stand-in: snap any value to the 8pt scale

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

This is the same rounding Figma performs when you nudge with the keyboard and the "big nudge" distance is set to 8, and it is a handy mental model for reviewing a design.

In Figma, arrow keys nudge by 1 px and Shift+arrow nudges by 10 px by default. You can change the big nudge amount in Preferences so Shift+arrow moves by 8.

Grids for structure

Figma has layout grids, visual guides you attach to a frame. Add one from the Layout grid section of the right-hand Design panel by pressing the plus. There are three types:

  • Grid: a repeating square grid (set the size to 8, for example), good for fine alignment.
  • Columns: vertical columns with a count, gutter (space between columns) and margin (outside space). Websites often use 12 columns; phones use 4.
  • Rows: horizontal bands with similar settings, helpful for vertical rhythm.

Layout grids are visual aids only: objects do not snap to them unless you make them, but constraints and auto layout (chapter 4) let you build truly responsive structure.

The math of a column grid

Suppose a desktop frame is 1200 px wide with 12 columns, a 24 px gutter and 0 px margin. Each column width follows from a simple formula:

column = (frame width - 2 ร— margin - (columns - 1) ร— gutter) / columns

Python Stand-in: column width calculator

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

If the result is not a whole number, adjust the gutter or margin until it is: that is why 1200 and 12 columns with a 24 px gutter (each column is exactly 78 px) is so popular.

Common frame sizes

You do not need to memorize sizes; Figma's Frame tool offers a preset list (phone, tablet, desktop, watch and more) in the right panel. A few typical starting points:

Target Common width
Phone 360-430
Tablet 768-834
Laptop 1280-1440
Large desktop 1920

These are starting points, not rules. Real devices vary, so you will design responsively later.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A 100 x 50 design frame is exported at @2x. What size is the PNG?

    @2x multiplies both width and height by two.
  2. 2. Which spacing values belong to an 8-point system?

    8-point systems use multiples of 8 (with 4 for fine detail).
  3. 3. What is a gutter in a column grid?

    Gutters separate neighbouring columns; margins sit at the outer edges.
  4. 4. Why prefer whole-number positions?

    An edge on a half pixel is blended across two physical pixels.

Summary

  • Design in logical pixels; export at 1x, 2x or 3x for raster assets.
  • Use whole numbers and a spacing scale such as 4/8/16/24/32.
  • Layout grids (grid, columns, rows) are guides; the column formula tells you column width.
  • Frame size presets are only starting points.

Next: Your First Design: A Profile Card