Alejandro Muñoz Fernández

Readability and comprehensibility calculator for Spanish texts

This calculator allows you to analyze the readability and comprehensibility of any text written in Spanish. It automatically calculates some of the main reading ease indices used in research, education, publishing, institutional communication, and health communication. Paste the text you want to analyze below:

1. Readability formulas

Readability formulas attempt to estimate the reading difficulty of a text through quantifiable features, mainly the length of words and sentences. Although none can completely measure reading comprehension, they all offer useful information to adapt a piece of writing to its audience.

1.1. Readability (Fernández Huerta)

José Fernández Huerta created the second formula to measure the readability of Spanish texts in 19591. It is based on Flesch’s Reading Ease formula, originally developed for English. The equation appears with errors on numerous websites, but it is presented here corrected2:

L=206,840,60P1,02FL = 206{,}84 - 0{,}60 P - 1{,}02 F

L is the readability; P, the average syllables per word; F, the average words per sentence.

Readability is interpreted according to this table:

LLevelSchool grade
90–100Very easy4th grade
80–90Easy5th grade
70–80Fairly easy6th grade
60–70Normal7th or 8th grade
50–60Fairly difficultPre-university
30–50DifficultSelective courses
0–30Very difficultUniversity (specialized)

1.2. Crawford’s formula

It is used to calculate the years of schooling necessary to understand a text. It was devised by Alan N. Crawford in 19893. It is only valid for elementary school children. The equation is as follows:

A=0,205OP+0,049SP3,407A = -0{,}205 \, OP + 0{,}049 \, SP - 3{,}407

A is the number of years of schooling; OP, the number of sentences per hundred words; SP, the number of syllables per hundred words. The result is rounded to the nearest tenth.

1.3. Perspicuity (Szigriszt-Pazos)

In 1993, journalist Francisco Szigriszt-Pazos proposed a formula in his doctoral thesis4 to measure the readability or reading comprehension ease of a text. It is a Spanish adaptation of Flesch’s equation. It is calculated like this:

P=206,83562,3SPPFP = 206{,}835 - \frac{62{,}3 \, S}{P} - \frac{P}{F}

P is the perspicuity; S, the total syllables; P, the total words; F, the total sentences.

Perspicuity is interpreted according to the table:

PStyleType of publicationEducation level
0–15Very difficultScientific, philosophicalUniversity graduates
16–35AridPedagogical, technicalUniversity entrance exams and university studies
36–50Fairly difficultLiterature and science writingHigh school
51–65NormalMass mediaPopular
66–75Fairly easyNovels, women’s magazines12 years
76–85EasyNewsstand publications11 years
86–100Very easyComics and cartoons6 to 10 years

1.4. García López’s formula

José Antonio García López proposed a formula in 19995 to measure the age required to understand a text. It is another Spanish adaptation of Flesch’s original English formula. It uses the variables syllables per word (S) and words per sentence (P) in the following equation:

E=0,2495P+6,4763S7,1395E = 0{,}2495 \, P + 6{,}4763 \, S - 7{,}1395

E is the minimum expected age to easily understand the text.

In addition, in 2001, he demonstrated its usefulness in determining the readability of informed consents6. He considers that the minimum age for this type of document should not exceed twelve years old (primary education level in Spain).

1.5. Readability μ (mu)

Readability μ (mu) is a formula to calculate the reading ease of a text. It was developed by Miguel Muñoz Baquedano and José Muñoz Urra in Chile in 20067. It factors in the number of words, as well as the mean and variance of the number of letters in words.

μ=(nn1)(xˉσ2)×100\mu = \left( \frac{n}{n - 1} \right) \left( \frac{\bar{x}}{\sigma^2} \right) \times 100

μ is the readability index; n, the number of words; , the mean number of letters per word; σ², its variance.

The result is interpreted as follows:

μReading ease
91–100Very easy
81–90Easy
71–80Somewhat easy
61–70Adequate
51–60Somewhat difficult
31–50Difficult
0–30Very difficult

1.6. Inflesz Scale (Inés Barrio)

The Inflesz readability scale measures the reading ease of a text. It was developed by Inés María Barrio Cantalejo and is adapted to the average modern Spanish reader. It is calculated exactly the same way as Szigriszt-Pazos’s perspicuity:

I=206,83562,3SPPFI = 206{,}835 - \frac{62{,}3 \, S}{P} - \frac{P}{F}

I is the Inflesz scale; S, the total syllables; P, the total words; F, the total sentences.

According to Inés Barrio’s doctoral thesis8, the interpretation of Szigriszt-Pazos’s formula needs adaptation because it was based on an insufficient, non-representative, and non-random sample of texts. With the Inflesz scale, the result is interpreted differently:

PerspicuityInflesz
0–40Very difficult
40–55Somewhat difficult
55–65Normal
65–80Fairly easy
80–100Very easy

The Inflesz scale has been used in the healthcare field to evaluate the readability of informed consents, patient leaflets, and health education materials. However, it can be applied to texts of any subject.

2. Other formulas to calculate Spanish text readability

The formulas included in the calculator are the most widely known and used. However, there are other Spanish readability assessment models that may be of historical or academic interest.

2.1. Comprehensibility (Gutiérrez de Polini)

Luisa Elena Gutiérrez de Polini (1972) created the first formula conceived, from the ground up, for Spanish (i.e., not an adaptation of an English formula). It is calculated as follows:

C=95,29,7LP0,35PFC = 95{,}2 - \frac{9{,}7 L}{P} - \frac{0{,}35 P}{F}

C is the text comprehensibility; L, the number of letters; P, the number of words; F, the number of sentences.

It is intended for school texts aimed at sixth-grade students. It is not suitable for texts aimed at adults or students of other ages.

I haven’t been able to locate the primary source9 on the internet; I’ve only found secondary references. A copy exists in the National Library of Venezuela.

I haven’t found an interpretation scale for it either. In principle, the lower the score obtained, the more difficult the text is.

2.2. SMOG-SOL Grade (Contreras)

The SMOG grade (McLaughlin, 1969)10 measures the readability of an English text. It is calculated with this formula:

G=3,1291+1,0430P30FG = 3{,}1291 + 1{,}0430 \sqrt{P - \frac{30}{F}}

Where G is the grade level, P is the number of words with three or more syllables, and F, the number of sentences.

Contreras adapted it to Spanish11 in 1999. It introduces the SOL formulas to convert the SMOG grade between English, Spanish, and French. For Spanish it looks like this:

E=2,51+0,74SE = -2{,}51 + 0{,}74 S

Where E is the converted Spanish grade level and S is the grade level obtained with the first formula.

The grade level represents the years of education needed to understand the text. It’s the data obtained with the second formula.

2.3. Spaulding

This was the first readability formula developed specifically for Spanish. Seth Spaulding published it in 195612:

D=1,609(L)+331,8(R)+22,0D = 1{,}609 (L) + 331{,}8 (R) + 22{,}0

Where D is the text difficulty; L is the average sentence length; R is the density of rare words (those not included in Milton Buchanan’s list of 1500 frequent Spanish lemmas). Furthermore, words repeated more than twice, days of the week, months, proper nouns, diminutives, augmentatives, toponyms, and demonyms are not considered rare.

The result is interpreted as follows:

ScoreDifficulty
0-40early teaching and highly simplified materials
40-60very easy
61-80easy
81-100moderately difficult
101-120difficult
121+exceptionally difficult

2.4. Natividad López Rodríguez’s Formulas

Natividad López Rodríguez published her prediction equations for Spanish reading comprehension difficulty in her doctoral thesis12, presented in 1981 and directed by José Luis Rodríguez Diéguez.

Her formulas include up to 27 linguistic variables:

The amount of formulas in her thesis is huge, but they can be summarized in this table:

GradeApplicationFormulaImportant
8th (E.G.B.)computer4No
8th (E.G.B.)computer5Yes
8th (E.G.B.)manual6No
8th (E.G.B.)manual7No
8th (E.G.B.)manual8Yes
8th (E.G.B.)computer9No
8th (E.G.B.)computer10Yes
7th (E.G.B.)computer11Yes
7th (E.G.B.)manual12Yes
7th (E.G.B.)manual13Yes

2.4.1. 8th Grade (E.G.B.) Formulas

Formulas with some of the 26 original variables
Computer formulas

Due to their complexity, a computer is required to calculate the difficulty index (D.I.).

Formula No. 4 (ten variables):

ID=102,41840,0843x1+0,2895x40,1002x90,65x160,0749x1931,6028x210,6295x220,4343x23+1,4490x240,8064x28ID = 102{,}4184 - 0{,}0843 x_{1} + 0{,}2895 x_{4} - 0{,}1002 x_{9} - 0{,}65 x_{16} - 0{,}0749 x_{19} - 31{,}6028 x_{21} - 0{,}6295 x_{22} - 0{,}4343 x_{23} + 1{,}4490 x_{24} - 0{,}8064 x_{28}

Formula No. 5 (seven variables):

ID=95,43990,0756x1+0,2012x40,0669x160,728x1935,2020x211,0601x22+0,7783x24ID = 95{,}4399 - 0{,}0756 x_{1} + 0{,}2012 x_{4} - 0{,}0669 x_{16} - 0{,}728 x_{19} - 35{,}2020 x_{21} - 1{,}0601 x_{22} + 0{,}7783 x_{24}
Manual formulas

Formula No. 6 (six variables):

ID=66,83330,1228x1+0,3288x40,1357x9+0,0917x110,0758x160,873x19ID = 66{,}8333 - 0{,}1228 x_{1} + 0{,}3288 x_{4} - 0{,}1357 x_{9} + 0{,}0917 x_{11} - 0{,}0758 x_{16} - 0{,}873 x_{19}

Formula No. 7 (five variables):

ID=66,57330,1120x1+0,1979x4+0,0816x110,0780x160,0820x19ID = 66{,}5733 - 0{,}1120 x_{1} + 0{,}1979 x_{4} + 0{,}0816 x_{11} - 0{,}0780 x_{16} - 0{,}0820 x_{19}

Formula No. 8 (four variables):

ID=67,06920,1029x1+0,2193x40,0779x160,0802x19ID = 67{,}0692 - 0{,}1029 x_{1} + 0{,}2193 x_{4} - 0{,}0779 x_{16} - 0{,}0802 x_{19}
Formulas with the optimized subset of 18 variables

Redundant ones are removed because they do not provide great predictive value, leaving simpler formulas.

Computer formulas

Formula No. 9 (twelve variables):

ID=89,98350,0879x1+0,0490x3+0,2879x40,1102x90,4618x10+0,0795x11+0,1356x120,0576x160,0562x1933,5654x210,8762x22+0,5710x24ID = 89{,}9835 - 0{,}0879 x_{1} + 0{,}0490 x_{3} + 0{,}2879 x_{4} - 0{,}1102 x_{9} - 0{,}4618 x_{10} + 0{,}0795 x_{11} + 0{,}1356 x_{12} - 0{,}0576 x_{16} - 0{,}0562 x_{19} - 33{,}5654 x_{21} - 0{,}8762 x_{22} + 0{,}5710 x_{24}

Formula No. 10 (nine variables):

ID=94,63240,0920x1+0,2776x40,1012x90,0700x110,0654x160,0712x1932,3625x210,9718x220,6469x24ID = 94{,}6324 - 0{,}0920 x_{1} + 0{,}2776 x_{4} - 0{,}1012 x_{9} - 0{,}0700 x_{11} - 0{,}0654 x_{16} - 0{,}0712 x_{19} - 32{,}3625 x_{21} - 0{,}9718 x_{22} - 0{,}6469 x_{24}
Manual formulas

Formulas obtained from the 18 optimized variables using 7 variables remain the same as those obtained from the 26 originals.

2.4.2. 7th Grade (E.G.B.) Formulas

Computer formulas

Formula No. 11 (nine variables):

ID=70,19700,1173x1+0,1944x40,2639x8+0,1100x110,2109x130,0396x16+8,9394x1854,6556x210,5998x22ID = 70{,}1970 - 0{,}1173 x_{1} + 0{,}1944 x_{4} - 0{,}2639 x_{8} + 0{,}1100 x_{11} - 0{,}2109 x_{13} - 0{,}0396 x_{16} + 8{,}9394 x_{18} - 54{,}6556 x_{21} - 0{,}5998 x_{22}

Formula No. 12 (seven variables):

ID=62,6180,0999x1+0,1589x4+0,1069x110,2416x13+10,8036x1855,6562x210,6509x22ID = 62{,}618 - 0{,}0999 x_{1} + 0{,}1589 x_{4} + 0{,}1069 x_{11} - 0{,}2416 x_{13} + 10{,}8036 x_{18} - 55{,}6562 x_{21} - 0{,}6509 x_{22}
Manual formulas

Formula No. 13 (four variables):

ID=61,65270,1363x1+0,2293x40,2308x130,0499x16ID = 61{,}6527 - 0{,}1363 x_{1} + 0{,}2293 x_{4} - 0{,}2308 x_{13} - 0{,}0499 x_{16}

3. What is text readability measurement for?

Readability formulas help estimate the reading difficulty of a text and can be useful for:

These metrics allow detecting potentially complex texts to better adapt them to the audience’s needs.

4. Readability formulas limitations

Readability formulas are useful tools, but they shouldn’t be interpreted as an exact measure of a text’s quality.

These indices are mainly based on quantifiable variables, such as word and sentence length. Therefore, they offer a reasonable estimate of reading difficulty, but do not take into account all the factors that influence comprehension.

They do not consider important aspects such as:

It’s also not true that a short word is always easier to understand than a long one. For example, “loor” (praise) is shorter than “alabanza” (praise), but the latter is usually much more familiar to most readers14.

Furthermore, it’s possible to obtain high scores by writing very short sentences that, nevertheless, form a confusing or incoherent text. Likewise, a specialized text can obtain a low score and still be perfectly suited for its audience.

Different formulas can produce different results when applied to the same text. This is normal because they use different criteria, and all have limitations.

For this reason, they should be used as an aid to review and improve texts, not as a goal in themselves. The priority must always be that the content is clear, useful, and appropriate for those who will read it.

Ultimately, no formula can substitute the author’s knowledge of their readers.

5. Other tools

5.1. Trunajod

Trunajod deserves a full article of its own. It’s a very complete tool that runs circles around this readability calculator.

Here are the instructions to install Trunajod on Debian 13:

Install the python3-venv package:

$ sudo apt install python3-venv

Create the virtual environment (use whatever path you want):

$ python3 -m venv /home/alejandro/Otros/venv

Activate the virtual environment (with your chosen path):

$ source /home/alejandro/Otros/venv/bin/activate

Install the packages:

$ pip install spacy click seaborn textract trunajod

Install the es_core_news_sm model:

$ python -m spacy download es_core_news_sm

And it’s installed.

To use it well, it’s best to follow the Trunajod instructions, which are in English.

You might need to download trunajod_models_v0.1.tar.gz into your working directory.

In that same folder, create the script (adapted from the Trunajod instructions):

#!/usr/bin/env python3
"""
Linguistic document analysis using TRUNAJOD and spaCy.

This script extracts text from various document formats and
calculates linguistic complexity metrics, such as lexical diversity
and density. It allows exporting the results to a CSV file.

Supported formats (via textract):
    .docx, .doc, .odt, .rtf, .pdf, .txt, .epub, among others.

Basic usage:
    python3 text-analyzer.py document1.docx document2.pdf

Export to CSV:
    python3 text-analyzer.py document1.docx --csv results.csv
"""

import argparse
import csv
import sys
from pathlib import Path
from typing import Dict

import spacy
import textract
import TRUNAJOD.ttr
from TRUNAJOD import surface_proxies


def parse_arguments() -> argparse.Namespace:
    """Configures and parses command-line arguments."""
    parser = argparse.ArgumentParser(
        description="Analyzes the linguistic complexity of one or more documents."
    )
    parser.add_argument(
        "files",
        nargs="+",
        type=Path,
        help="Paths to the files to be analyzed (e.g. docx, pdf)."
    )
    parser.add_argument(
        "--model",
        type=str,
        default="es_core_news_sm",
        help="spaCy model to use (default: es_core_news_sm)."
    )
    parser.add_argument(
        "--csv",
        type=Path,
        metavar="CSV_FILE",
        help="Path to the CSV file where the results will be exported."
    )
    return parser.parse_args()


def analyze_document(nlp: spacy.Language, filepath: Path) -> Dict[str, float]:
    """
    Extracts text from a file and calculates its linguistic metrics.

    Args:
        nlp: Loaded spaCy language model object.
        filepath: Path to the file to process.

    Returns:
        A dictionary with the calculated metrics in key-value format.
    """
    text = textract.process(str(filepath)).decode("utf8")
    doc = nlp(text)

    return {
        "Lexical diversity (MTLD)": TRUNAJOD.ttr.lexical_diversity_mtld(doc),
        "Lexical density": surface_proxies.lexical_density(doc),
        "Dissimilarity (POS)": surface_proxies.pos_dissimilarity(doc),
        "Connection words ratio": surface_proxies.connection_words_ratio(doc),
    }


def main() -> None:
    args = parse_arguments()
    global_results = []

    print(f"Loading language model '{args.model}'...\n", file=sys.stderr)
    try:
        nlp = spacy.load(args.model, disable=["ner", "textcat"])
    except OSError:
        print(
            f"[!] Error: Could not load the model '{args.model}'.\n"
            f"Make sure you have downloaded it by running:\n"
            f"    python3 -m spacy download {args.model}",
            file=sys.stderr
        )
        sys.exit(1)

    for file in args.files:
        print(f"{'=' * 60}")
        print(f"File: {file.name}")
        print(f"{'=' * 60}")

        if not file.exists():
            print(f"[!] Error: The file '{file}' does not exist or the path is incorrect.\n")
            continue

        try:
            results = analyze_document(nlp, file)

            # Save the results for the CSV, adding the file name
            csv_row = {"File": file.name}
            csv_row.update(results)
            global_results.append(csv_row)

            for metric, value in results.items():
                print(f"{metric:<30}: {value:>8.4f}")
            print()

        except textract.exceptions.ExtensionNotSupported:
            print(f"[!] Error: Unsupported file format for '{file.name}'.\n")
        except Exception as exc:
            print(f"[!] Unexpected error processing '{file.name}': {exc}\n")

    # CSV file generation if requested and valid data exists
    if args.csv and global_results:
        try:
            with open(args.csv, mode="w", newline="", encoding="utf-8") as csv_file:
                fields = list(global_results[0].keys())
                writer = csv.DictWriter(csv_file, fieldnames=fields)

                writer.writeheader()
                writer.writerows(global_results)

            print(f"[*] Results successfully exported to '{args.csv}'.")
        except Exception as exc:
            print(f"[!] Error writing the CSV file: {exc}", file=sys.stderr)
    elif args.csv:
        print("[!] CSV was not generated because there were no valid results.", file=sys.stderr)

    print("\nAnalysis finished.")


if __name__ == "__main__":
    main()

Save it with any name with a .py extension, like text-analyzer.py, and run it like this:

$ python3 text-analyzer.py file1.docx file2.docx

Which gives an output similar to this:

Loading language model 'es_core_news_sm'...

============================================================
File: file1.docx
============================================================
Lexical diversity (MTLD)      :  40.6846
Lexical density               :   0.5739
Dissimilarity (POS)           :   0.5232
Connection words ratio        :   0.0771

============================================================
File: file2.docx
============================================================
Lexical diversity (MTLD)      :  36.3744
Lexical density               :   0.5107
Dissimilarity (POS)           :   0.4518
Connection words ratio        :   0.0521

============================================================
File: file3.odt
============================================================
Lexical diversity (MTLD)      :  47.9361
Lexical density               :   0.5425
Dissimilarity (POS)           :   0.4105
Connection words ratio        :   0.0512


Analysis finished.

We obtain:

You can obtain many more text parameters from each file. They are all in the Trunajod API reference manual.

5.2. Estilector

Estilector is a writing aid program for academic texts in Spanish. It analyzes the text, detects stylistic and writing issues, and offers suggestions for improvement, as well as some spelling corrections. It works by copying and pasting the text into the platform to receive well-founded recommendations, although these should be interpreted as guidelines and not as mandatory rules.

5.3. Artificial Intelligence

Nowadays, artificial intelligence assistants can automatically simplify many texts and adapt them to different reading levels. You can enter a prompt similar to this:

Rewrite this Spanish text so it’s easier to understand for 16-year-olds: And here you paste the text

You quickly get a very good result.

However, knowing the fundamentals of readability is still useful. These formulas allow you to objectively evaluate the changes made, compare versions of the same document, and better understand what factors influence reading ease.

Furthermore, no automatic tool knows readers as well as the person who writes the text. It’s better to do things yourself, because AI makes you dumber the more you use it.


  1. Fernández Huerta J. (1959). Medidas sencillas de lecturabilidad. Consigna (Revista pedagógica de la sección femenina de Falange ET y de las JONS), (214), 29‑32. ↩︎

  2. Gwillim Law (2011). Error in the Fernandez Huerta Readability Formula↩︎

  3. Crawford, Alan N. (1989). Fórmula y gráfico para determinar la comprensibilidad de textos de nivel primario en castellano. ↩︎

  4. Szigriszt Pazos, Francisco (1993). Sistemas predictivos de legibilidad del mensaje escrito: fórmula de perspicuidad. Doctoral thesis. ↩︎

  5. García López JA, Arcos A. «Medida de la legibilidad del material escrito». Pharm Care Esp 1999; 1(6): 412‑9. ↩︎

  6. García López JA. Legibilidad de los folletos informativos. Pharm Care Esp 2001; 3:49‑56. ↩︎

  7. Muñoz, M. and Muñoz, J. (2006). Legibilidad Mμ. Viña del Mar, Chile. ↩︎

  8. Barrio, Inés (2008). Validación de la Escala INFLESZ para evaluar la legibilidad de los textos dirigidos a pacientes. An Sist Sanit Navar 2008; 31(2): 135‑152. ↩︎

  9. Gutiérrez de Polini, L.E. (1972). Investigación sobre lectura en Venezuela. Document presented at the First Primary Education Conference. Ministry of Education, Caracas. ↩︎

  10. McLaughlin, G. Harry (May 1969). «SMOG Grading — a New Readability Formula». Journal of Reading. 12 (8): 639–646. Retrieved 2016-12-07. ↩︎

  11. Contreras, A.; Garcia-Alonso, R.; Echenique, M.; Daye-Contreras, F. (1999). «The SOL Formulas for Converting SMOG Readability Scores Between Health Education Materials Written in Spanish, English, and French». Journal of Health Communication. 4 (1): 21–29. doi:10.1080/108107399127066. PMID 10977275. Retrieved 2008-09-20. ↩︎

  12. López Rodríguez, Natividad. (1981). Fórmulas de legibilidad para la lengua castellana. Pages 1-650. ↩︎ ↩︎

  13. García Muñoz, Óscar. 2012. Lectura fácil. Métodos de redacción y evaluación (PDF). ↩︎

  14. Corpus de Referencia del Español Actual (CREA); Listado de frecuencias. Lista total de frecuencias. October 1, 2017. ↩︎