Skip to the content
  • "The more that you read, the more things you will know. The more that you learn, the more places you'll go." - Dr. Seuss
Get Started
Imagine
Digital Landscapes for your personal wonder
  • About
  • Blog
  • CS Knowledge Base
  • Ebooks
  • Embed Link
  • Home
  • Imagine Blog
  • Links
  • OmniVision
  • About
  • Blog
  • CS Knowledge Base
  • Ebooks
  • Embed Link
  • Home
  • Imagine Blog
  • Links
  • OmniVision

CS Knowledge Base

  • Home
  • CS Knowledge Base

⁄

Template documentation[view] [edit] [history] [purge]

This template builds an alternative form of common fractions. The template takes zero, one, two, or three parameters: the optional integer (may be signed), the optional numerator and the required denominator; in this order.

Please do not substitute it. This template should also not be used in certain situations; see MOS:FRAC and MOS:MATH § Fractions. For science or mathematical articles, use {{sfrac}} instead. To allow numerical sorting of a column containing fractions, use data-sort-value="X.YYY" where X.YYY is a rounded decimal equivalent. See Help:Sortable tables for more information and options. Inside citation templates, use the cleaner {{citefrac}}.

{{fraction|A|B|C}}
A+B⁄C (integer, numerator and denominator)
{{fraction|B|C}}
B⁄C (numerator and denominator)
{{fraction|C}}
1⁄C (denominator only)
{{fraction}}
⁄ (fraction slash only)

Examples

Numbers
1⁄2, 1⁄3, 2⁄3, 1⁄4, 3⁄4, 1⁄5, 2⁄5, 3⁄5, 4⁄5, 1⁄6, 5⁄6, 1⁄7, 2⁄7, 3⁄7, 4⁄7, 5⁄7, 6⁄7, 1⁄8, 3⁄8, 5⁄8, 7⁄8, 1⁄16, 3⁄16, 5⁄16, 7⁄16, 9⁄16, 11⁄16, 13⁄16, 15⁄16
Units
m⁄s, km⁄h, kg·m⁄s2, 1⁄s, Mbit⁄s

Notes

  • {{fraction}} or ⁄ may be used to print out the fraction slash glyph " ⁄ ".
  • For mixed fractions, in some contexts (like link targets) a "+" is generated between the whole number part and fraction part. If this is not desirable, put the whole number part outside the template, and put a non-breaking space between when the spacing is desirable. For example: "33 {{frac|1|3}}".

Parameters

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Fraction in articles based on its TemplateData.

TemplateData for Fraction

For science or mathematical articles, use {{sfrac}} instead. Per [[MOS:FRAC]] and [[MOS:MATH#Fractions]]. A template for displaying common fractions of the form int+num/den nicely. It supports 0–3 anonymous parameters with positional meaning.

Template parameters[]

ParameterDescriptionTypeStatus
leftmost part1

Denominator if only parameter supplied. Numerator if 2 parameters supplied. Integer if 3 parameters supplied. If no parameter is specified the template will render a fraction slash only.

Lineoptional
middle-right part2

Denominator if 2 parameters supplied. Numerator if 3 parameters supplied.

Lineoptional
rightmost part3

Denominator, always.

Lineoptional

See also

  • Wikipedia:Rendering math
  • {{1/2}} (1⁄2), {{1/3}}, {{2/3}}, {{1/4}}, {{3/4}} – shorthands that use this template
  • {{sfrac}} (⁠1/2⁠) – displays common fractions using a vinculum (horizontal line), for scientific and mathematical text
  • {{su}} (superscript
    subscript
    text) – to align both b=subscript & p=superscript
  • {{sub}} (subscript text) – to show a subscript
  • {{sup}} (superscript text) – to show a superscript
  • Help:Displaying a formula § Fractions, matrices, multilines
  • Help:Convert § Fractions
  • Number Forms, a Unicode block consisting primarily of vulgar fractions
  • OpenType fonts feature frac, CSS font-variant-numeric:diagonal-fractions
  • U+2215 ∕ DIVISION SLASH


Math templates
  • Functions
  • Numeral systems
Functions
  • elementary arithmetic
  • precision
  • val (value formatting)
  • percentage
Numeral systems
  • {{#invoke:BaseConvert|XtoY}}
  • binary
  • decimal2Base
  • hex2dec
  • hexadecimal
  • octal
  • quaternary
  • rn
  • roman
  • ternary
  • vigesimal
Conversions
convert many units (see: list)
cvt abbreviated {{convert}}
convinfobox {{convert}} for infoboxes
bbl to t barrels of oil to tonnes
long ton long hundredweights, quarters and pounds to kilograms;
long tons and hundredweights to pounds and metric tons
miles-chains miles and chains to kilometres linking "chains"
decdeg degrees, minutes, and seconds to decimal degrees
deg2dms decimal degrees to degrees, minutes, and seconds
deg2hms decimal degrees to hour angle (in hours, minutes, and seconds)
hms2deg hour angle (in hours, minutes, and seconds) to decimal degrees
inflation calculate inflation of Consumer Price Index-related prices
pop density population density in an area
track gauge railway track gauges
Notation and formatting
bigmath bigger font to match TeX \displaystyle (standalone formulas only) math short text-based formulas
mathcal [mathematical] calligraphic font; alternative to LaTeX \mathcal{...} tombstone symbol indicating the end of a proof
mvar individual italicized maths variables in normal text val measurement values, uncertainties and units
  • overline
  • underline
a line set above/below a sequence of characters vec various overarrows, underarrows, etc.
abs absolute values (paired vertical lines)
  • langle
  • rangle
  • angbr
  • angular brackets
  • bra-ket
  • braket
  • bra
  • ket
  • bra–ket notation
  • ldelim
  • rdelim
  • multiline delimiters (2–5 lines inclusive)
    ceil, floor calculations :mw:Help:#expr; formatting indicators ⌈3.14⌉, ⌊3.14⌋ (no calculation performed) pars parentheses that can be resized (∑)
    fraction slant fractions 3⁄5 (not for maths/science articles; use standing or upright fractions {{sfrac}} instead) sfrac "standing" or upright fractions ⁠3/5⁠ (use in maths/science articles instead of{{fraction}})
    intmath integral symbols
  • sub
  • sup
  • su
  • subscripts and superscripts
  • overset
  • underset
  • arbitrary characters/diacritics set above/below one another    
    tmath Wrap TeX in <math> tags
  • Boxes
  • Tags
  • Notices
  • BoxesTags
    • arithmetic operations
    • calculus
    • Infobox mathematical function
    • functions
    • metricate
    • undue precision
    • units attention
    • Category
    • Module:Math
    source: https://en.wikipedia.org/wiki/Template:Fraction
    • This page was last edited on 16 January 2024, at 00:53 (UTC).
    • Text is available under the Creative Commons Attribution-ShareAlike 4.0 License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Legal & safety contacts
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Mobile view
    • Wikimedia Foundation
    • Powered by MediaWiki

    Search

    Recent Posts

    • Digital Art by Dasha K.
    • Music Lab: Jam Session by Simon S.
    • AP Computer Science Principles A – Slide Decks
    • What determines our intelligence
    • The Learning Zone

    Archives

    • September 2025
    • July 2025
    • June 2025

    Quick contact info

    Lorem ipsum dolor sit amet, the administration of justice, I may hear, finally, be expanded on, say, a certain pro cu neglegentur. Mazim.Unusual or something.

    2130 Fulton Street, San Francisco
    support@test.com
    +(15) 94117-1080

    Categories

    • Artificial Intelligence
    • CodeHS
    • Computer Science
    • Digital Art
    • Education
    • Growth Mindset
    • Java
    • micro:bit
    • Minecraft Education
    • Python
    • Uncategorized
    • What Mr. Goldstein is currently working on
    • WordPress

    Archives

    • September 2025
    • July 2025
    • June 2025
    Copyright © 2025 | Powered by WordPress | formula theme by A WP Life