Cell counting

How to Count Cells and Nuclei in Microscopy Images

You can count nuclei and cells with free tools such as Fiji (ImageJ), QuPath and CellProfiler, or without any setup in SlideScope on Windows and Mac. Which one fits depends on how crowded your objects are, how many images you have, and whether you want to write code. Below: every option, then the exact steps in ImageJ and in SlideScope.

ImageJ, QuPath, CellProfiler, SlideScopeCZI, ND2, SVS, TIFFRuns on your own computer

Ways to count cells and nuclei

ToolCostPlatformsBest for
Fiji / ImageJFree, open sourceWindows, macOS, LinuxSingle images and simple backgrounds; Analyze Particles, macros for batches
QuPathFree, open sourceWindows, macOS, LinuxWhole-slide images, IHC positive-cell counts, scripted projects
CellProfilerFree, open sourceWindows, macOSReproducible pipelines over large image sets
Cellpose or StarDistFree, open sourcePython; plugins for Fiji, QuPath and napariCrowded or irregular nuclei and cells (deep learning)
SlideScopePaid; counting comes with the 3-day free trialWindows 10/11, macOS 14+No-code counting with InstanSeg or a threshold, calibrated density, CSV export, folder batches

For a crowded field, a deep-learning model separates touching nuclei far better than a threshold. Check the licence of any pretrained model you use: some are for non-commercial use only.

How to count nuclei in ImageJ (Fiji)

  1. Open the image in Fiji (CZI, ND2 and most microscope formats open through Bio-Formats). Check the scale under Image › Properties so sizes come out in µm.
  2. Keep only the nuclear channel (for example DAPI): Image › Color › Split Channels, or Image › Type › 8-bit for a single-channel image.
  3. Smooth lightly with Process › Filters › Gaussian Blur (sigma 1-2) to reduce noise.
  4. Threshold with Image › Adjust › Threshold (try Otsu or Default), then Apply to make a binary mask.
  5. Split touching nuclei with Process › Binary › Watershed.
  6. Run Analyze › Analyze Particles with a size range that excludes debris, tick Summarize and Display results. The Summary window shows the count; the Results table lists each object's area.

For many images, record these steps with Plugins › Macros › Record and run the macro over a folder. For positive cells, measure each nucleus's intensity in the marker channel and set a cut-off.

How to count nuclei and cells in SlideScope (no code)

  1. Open the image in SlideScope on Windows or Mac, and choose the field, plane or region to count. Large planes are analysed at reduced resolution, so count a region of a gigapixel slide.
  2. Pick nuclei, cells or particles, and the engine: InstanSeg deep-learning weights for nuclei and cells, or a classical threshold with Otsu auto-selection, smoothing and area limits.
  3. Check the overlay and exclude any object the segmentation got wrong.
  4. Export a CSV object table, GeoJSON outlines (they open in QuPath), a labelled mask TIFF and a methods summary, or save the settings as a recipe and run it over the first plane of every image in a folder.

Results include counts, density per mm² wherever the pixel size is recorded, area and shape for every object, mean intensity in every channel, and optional marker-positive classification against one or two marker channels. Segmentation runs on your own computer; nothing is uploaded. More on the counting page.

Which to choose

For a handful of clean fluorescence images, Fiji is free and the steps above take minutes. For whole slides or IHC positive-cell scoring, QuPath is the standard free choice. For thousands of images in a fixed pipeline, CellProfiler. Choose SlideScope when you want counting, measuring and viewing in one desktop app with no setup or scripts, for CZI, ND2, SVS, LIF and other formats, with images kept on your own computer. For a wider list, see the microscopy image analysis software comparison.

Cell counting questions

How do I count cells in ImageJ?

Open the image in Fiji, keep only the nuclear or cell channel, smooth it lightly (Process › Filters › Gaussian Blur), threshold it (Image › Adjust › Threshold, then Apply), split touching objects with Process › Binary › Watershed, and run Analyze › Analyze Particles with a size range and Summarize ticked. The summary row is the count.

Can ImageJ count cells automatically?

Yes, for well-separated objects on a clean background: thresholding plus Analyze Particles counts them automatically, and a macro repeats it over a folder. Crowded or touching nuclei need the watershed step or a deep-learning model such as StarDist or Cellpose.

How do I count positive cells in an IHC or fluorescence image?

Detect every nucleus first, then classify each one by the intensity of a marker channel or stain. QuPath does this with Positive cell detection on brightfield DAB images; SlideScope classifies objects as marker-positive against one or two marker channels.

Can I count cells without coding?

Yes. Fiji, QuPath and CellProfiler all work through menus, and SlideScope counts nuclei and cells from a panel with no scripts or plugins. Code is only needed for custom pipelines.

Is SlideScope free?

SlideScope is a paid app with a free preview (open, measure and annotate a few of your own images) and a 3-day free trial.

Free preview: open, measure and annotate up to 5 of your own images. No account or card needed. Export, sharing, comparing slides and AI Analysis come with the 3-day free trial: $0 today, then $25/month unless you cancel before it ends. PayPal or card required, and you can cancel anytime from your account. Annual billing is available at $249.99/year, which works out to about two months free.

Does SlideScope upload my images to count them?

No. Segmentation and measurement run on your own computer. The only download is the model weights, which SlideScope checks against their SHA-256 digest before loading them.

Count on your own images

Open your own images in SlideScope with the free preview, then count with the 3-day free trial. Already decided? Subscribe now.

Download SlideScope